Is it possible to view Java applets without publishing the HTML files to the web? And would an unpublished Weebly site be able to do that (with the 'edit CSS/HTML' button thingamajig) ('thingamajig' isn't curly-red-underlined!)?
Offline
You can view java applets in your bowser. Make a html file with a Java applet and you can view it but it's not on the web. Java programs can also be run with cmd on a computer with java.
My site Offline
what-the wrote:
You can view java applets in your bowser. Make a html file with a Java applet and you can view it but it's not on the web. Java programs can also be run with cmd on a computer with java.
Can you post the HTML code here, maybe? I've tried <applet code="name.class" />, <applet code="name.jar" />, <embed src="name.class" />, <embed src="name.jar" />, and <applet code="name.class" archive="name.jar" /> (yes, I have all the files). The *.class ones don't give me anything (like a tag that doesn't work), the *.jar ones give me a plug-in not found (I have a Java player- I've played some Java games before), and the *.class and *.jar give me another plug-in not found.
Offline
Harakou wrote:
Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.
When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'. What does that even mean?
Offline
maxskywalker wrote:
Harakou wrote:
Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.
When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'. What does that even mean?
Are you running the compiled class file?
Offline
Harakou wrote:
maxskywalker wrote:
Harakou wrote:
Yeah, you can run Applets without a browser. Just run the program from the command line and an applet viewer will pop up.
When I do that, it says 'Exception in thread "main" java.lang.NoSuchMethodError: main'. What does that even mean?
Are you running the compiled class file?
Yes. I'm typing 'java HelloWorld' (the class is called HelloWorld/HelloWorld.class).
Offline
Okay, I fixed the error message. I made the applet an external class which is accessed from a normal class, but the viewer icon just opens, then closes, while nothing else happens. I can add a 'import java.util.Scanner; Scanner input = new Scanner(System.in); String delay = input.nextLine();', but that just keeps the icon open while still not showing any window whatsoever.
Last edited by maxskywalker (2011-10-31 19:54:02)
Offline