• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading my Applets

 
Glenn Castro
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java file named Client.java. Upon compiling, it produced two classes named Client.class and Client$1.class(I think this is a subclass when i create a new Runnable object). When I upload the Client$1, it shows an error "invalid class format". Is this class necessary in uploading my applets? Is it possible if i upload my classes inside a jar?
 
Korol Bloom
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glenn,
what do you mean with uploading? Sending the files to a webserver? Do you get the same error if you start this locally?
I suggest, pack the files in a jar. Jars are much easier to handle than single classes, if your applet gets bigger.
, korol
 
Jason Huntz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class is necessary and it is probably the Runnable as you suspected. I agree putting it in a jar might make the process easier
 
Glenn Castro
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks guys for the advice.
Now, I have new question. How can I call the class in the jar file in HTML.
When it is not jar. I used the ff. in the html
<applet code="Client.class" width=300 height=300>
if I upload the jar file, should it be:
<applet code="Client.jar" width=300 height=300>
where Client.jar is the name of the jar file
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<applet code="Client.class" archive="whatever.jar" width=300 height=300>
If you have more than one JAR file, you can list them separated by commas.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic