• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do we load ................

 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody tell me , how to create a jar file , so that by double cliking the jar file icon , the applet is loaded .
 
rekha joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can make a jar file by using the following command
jar -cvm file.jar file.class(all the classes)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the OS. For Windows you could set up the registry so that the "Open" command for a file with the ".jar" extension is "java -jar %1".
However, APPLETS don't work that way! They get loaded when the web page that they're embedded in gets loaded (unless you plan to use the appletViewer). This is automatic, with no clicking involved.
I don't really recommend making jars execute when double-clicked, though. Not all jars are executable - for example the java library jars.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi :
<u>Tim Holloway :</u> i know how the applet gets loaded but my question is different .
I downloaded an exam stimulator ....... the file i downloaded was a jar file which on clicking opens
an applet ( the exam stimulator ). ...... so i thought maybe this is an option to open a dowloaded
applet ( which opens by clicking the jar file ).

<u>rekha joshi: </u> the name of my file is "myodbc"...... so am i suppose to write the following
code : <b> jar -cvm myodbc.jar myodbc.class </b>. Tell me if this is correct .
when i type this commend , i get an error ( file not found , myodbc.jar ).
i hope i,am able explain what i want .
thanx
raghav
rax_india@yahoo.com
 
rekha joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using this code
jar -cvf myodbc.jar myodbc.class.
reply me back.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That wasn't an APPLET, it was an APPLICATION!
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All it does it creates a jar file but nothing happens on clicking the jar file icon.
i hope i,am putting up my question correctly .
Originally posted by rekha joshi:
Try using this code
jar -cvf myodbc.jar myodbc.class.
reply me back.

 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still waiting !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic