Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running an applet from a jar

 
Paul Bailey
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you run an applet from a .jar file.
I have my .jar all made and my html contains the line
<applet code=myJar.jar ... >
but when i try to run it, i get
java.lang.ClassNotFoundException: myJar.jar
but it is there on the server.
I also just noticed that netscape 4.7's page info regarding the jar says, "Whatchew talkin' 'bout, Willis?"
Paul
[This message has been edited by Paul Bailey (edited April 24, 2001).]
[This message has been edited by Paul Bailey (edited April 24, 2001).]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

To get an applet to run from a jar file, you have to use the archive attribute and the code attribute in the applet tag, e.g. :



Where myJar.jar is the name of the jar file and myClass.class is the name of the class inside the jar file you are trying to run.

Where did you see the "Whatchew talkin' 'bout, Willis?" message?

-Nate
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried that also, but even that it doesn't work.
I have even experimented with the menifest file also, but even that couldn't produce the desired result.
Actually I am having around 12-15 classes that are to be shipped along with the main applet class, so i am packaging them into the jar and then shipping them to the client browser, but at the browser end, that doesn't work.
It simply refuses to recognize the presence of jar file.
what do i do, please help...

regards
raghav..
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing a similer problem, my applet works fine on the appletviewer as I have signed it successfully using JDK 1.3 security tools. But it doesn't work on netscpae , although I have done the signing process step by step using netscape signing tool. I have posted a topic "Please Help!!!" but no replies since a long time .
I am currently using netscape 6 that supports java plug-in 1.3, and the applets work fine there, but not signed ones.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic