Reputation: 10402
I implemented the java applet application. I searching for the process of how to create the executable file for this application.I am not find any good solution. Please can anybody help me.
thanks
Upvotes: 0
Views: 8413
Reputation: 1
Executable applet is nothing but the .class file of the applet, which is obtained by compiling the source code of the applet. Compiling an applet is exactly the same as compiling an application. Therefore, we can use the Java compiler to compile the applet.
Assume that we have created a file called HelloJava.java for our applet. Here are the steps required for compiling the HelloJava applet.
Move to the directory containing the source code and type the following command: javac HelloJava.java
The compiled output file called HelloJava.class is placed in the same directory as the source.
If any error message is received, then we must check for errors, correct them and compile the applet again.
Upvotes: 0
Reputation: 85516
Otherwise, if you want to run the applet outside the browser, you can create the JAR file normally and then user appletviewer to launch it.
Upvotes: 0
Reputation: 168835
Applet
or JApplet
, create a JFrame
.If you would like to make it a nicer experience for the end user, create a web page that uses deployJava.js to check that a suitable JRE is installed, then launch the JFrame
using Java Web Start.
Upvotes: 1
Reputation: 51553
The executable of a Java applet is either a .jar
file, or the .class
directory.
You execute a Java applet within a web page. You place the .jar
file or the .class
directory in your web directory structure.
Here's an example HTML applet:
<applet code=NameOfApplet.class name=NameOfApplet archive=NameOfApplet.jar
width=300 height=300>
<param name="bgcolor" value="ffffff">
<param name="fontcolor" value="000000">
Your browser is not Java enabled.
</applet>
Further information can be found at How to Make Applets.
It's been a while since I've had to code an applet, but the archive parameter can include directories.
Upvotes: 3