• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet invoked from within a jar file

 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i just saw some samples .... class files bundled into a jar file . Clicking on the jar file would invoke the applet . How do we achieve this ?Please reply as soon as possible.
regards
raghav mathur
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try a quick search on the Java in General (beginner) forum for jar - you'll find a link to a page at java.sun.com on jar files.
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dirk
I need to submit a game applet soon. So please if you could tell me how do bundle all the class files into a jar file so that when i click on the jar file icon , it invokes the applet for me .I'll go through this tutorial later .
thanks
regards
raghav mathur
Originally posted by Dirk Schreckmann:
Ok, here it is:
http://java.sun.com/docs/books/tutorial/jar/index.html

[ May 07, 2002: Message edited by: raghav mathur ]
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dirk
i,am waiting for your reply .
thanks in advance
regards
raghav mathur
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still waiting !
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like you could have read the tutorial by now.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read a bit but did not find what i wanted to .
Originally posted by Marilyn deQueiroz:
It seems like you could have read the tutorial by now.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can run an applet by double-clicking on a jar file. The tutorial does explain how to do it with an application.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So please if you could tell me that if i do not want to run this applet in the browser and at the same time i do not want to use the appletviewer command to run it ...what should i do then ?
regards
raghav mathur
Originally posted by Thomas Paul:
I don't think you can run an applet by double-clicking on a jar file. The tutorial does explain how to do it with an application.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turn it into an application.
Applets run in browsers. That's what they do. You don't like browsers then write an application.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
raghav,
As Thomas has pointed out, an applet must run within the context of something else - a Java enabled web broswer or appletviewer. With a jar file you could run an application that invokes a browser or appletviewer to view a specified applet.
Are you sure you want to run an applet apart from a browser or appletviewer?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remebering that an Applet is a Panel, you could add an instance of the Applet to an application Frame in an extra-lazy-person's-applet-to-application-conversion-strategy like this:

Good Luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic