|
-
May 30th, 2011, 03:06 AM
#1
Finishing applet
Hi all,
When I finished applet program, can I compile it as a .jar, or .war file so that its accessible via web?
I need some files/*.txt/ to be loaded at applet start up - at the init() function, I need the applet to read the contents of the files according user preference. Is this option possible, to compile the text files together in the web archive /.war files/?
-
May 30th, 2011, 03:50 AM
#2
Re: Finishing applet
When I finished applet program, can I compile it as a .jar, or .war file so that its accessible via web?
A .war file is for holding the web components of a J2EE app. If you are just deploying an applet via an HTML page then use a .jar file.
I need some files/*.txt/ to be loaded at applet start up - at the init() function, I need the applet to read the contents of the files according user preference. Is this option possible, to compile the text files together in the web archive /.war files/?
You don't compile the text files, but you can add them to a .jar or .war file and access them from your applet.
-
May 30th, 2011, 09:12 AM
#3
Re: Finishing applet
Note on reading files from a jar file. Use the getResourceAsStream method and not the File class.
Norm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|