I have an applet and I can't export it to a runnable jar because it doesn't have a main class( public static void main(String args[]) ) I need a runnable jar because I have a program that has many classes and packages. How do I make this work. If the answer is adding a main method what do I put in the main method?
Update I tried to use a normal .jar but still nothing. Here is a reply i sent to better describe what is happening
"I still get the class not found error. I have a .jar that has a "main" folder. Then in the "main" folder I have all my classes. My main class is Render.class so in html i use this code to open the applet: "
To export your project, right-click it and select Export. Select Java > Runnable JAR file as the export destination and click Next. On the next page, specify the name and path of the JAR file to create and select the Launch configuration that includes the project name and the name of the test class.
A runnable jar is a jar file that has an embedded Manifest file that includes the "Main-Class:" declaration.
Select the Java extension classes, right-click and select Export from the context menu as shown in the following screen shot: The Export dialog box opens. Select the JAR file and click Next as shown in the following screen shot: The JAR Export File Specification dialog box opens.
If it's an applet it isn't a 'runnable jar'. Luckily, you don't need one. You just need an ordinary jar. Eclipse will make one of those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With