Hello java ranchers. I developed a java applet in eclipse for the first time which I plan on uploading to my website. The applet runs great within eclipse. However, when I export this project to a jar file and try to run the jar file from a command prompt I get: "no main manifest attribute, in myClass.jar" . After searching many sites for an answer I added the following line to my MANIFEST.MF file: Main-Class: org.eclipse.jdt.myClass .When I run the jar file again I get the same message as before. I am not sure if org.eclipse.jdt is correct. I got this from the .classpath file and it's a guess. When I run the jar file again I get the same message as before. Other observations: the myClass.java source file has no main() or int() method. I don't know if that's relevant or not. I am at my wits end trying to figure this out. Please help!
Briefly, Applets can't be run with the java -jar command. They normally run in a browser, and can be run in the applet viewer, usually from an IDE.
There are no new questions, but there may be new answers.
posted 7 years ago
Thanks for the advice. I have read the tutorial and I am making progress. I have rewritten much of the source code in eclipse. Once again, the applet runs in eclipse. After having exported the project to a jar file, and creating some html code, I am now running the applet from a .htm file. When running the applet I am getting an AccessControlException: access denied("java.io.FilePermission""myPic.jpg""read"). The .jpg file is included in the jar file.
Also, as a moderator I'm required to give you advice about certain topics. So I would just like to remind you that this forum has a rule, and that rule is "Be Nice".
posted 7 years ago
If your advice to beginners is to refer them to the java api, then don't bother. We can find it on own. If you are the moderator, I don't need your worthless forum. You know what you can do with yourself!