Reputation: 87
How can I run Java applet from web on local (Windows 7)?
I downloaded file A.jar.pack.gz from web. This file I unpacked by unpack200.exe
and after running unpacking jar there is this: Error: Invalid or corrupt jarfile C:\...
Upvotes: 0
Views: 1423
Reputation: 1364
If a java program is written to be an applet, it will assume that it has all the support structure of an external applet player, browser, etc. It therefore generally won't be able to run on its own as a Java program.
Vijay's solution could work, as might opening your new HTML snippet in a browser. The only way to get it to run with nothing but Java would be to rewrite bits of the program to provide a stand alone interface, or contact the original developers asking whether they'd be willing to do so.
Upvotes: 0
Reputation: 313
If you have installed the jdk then You can extract the jar file through the following command :
step 1: jar xvf jarfilename
and then
step 2: create any text or html file and make the following entry:
<applet code="className" archive="jarname" height="any number" width="anynumber">
</applet>
the classname can be found when you have extracted the jar through the step 1
step 3: appletviewer filename
and yes ofcourse for the above commands to work you must set the path till jdk\bin
Upvotes: 1