0

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:\...

asked Dec 14, 2013 at 14:39
3

2 Answers 2

1

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

answered Dec 14, 2013 at 15:05
Sign up to request clarification or add additional context in comments.

Comments

0

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.

answered Dec 14, 2013 at 15:23

2 Comments

Thanks for reply. I guess "rewrite bits of the program to provide a stand alone interface" is not only manually rewrite some first bits.
Unfortunately not. It's the kind of rewrite that you'd need access to the original source code for, though if you had that it probably wouldn't be that hard to change.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.