This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes Delivering configuration files to client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Delivering configuration files to client" Watch "Delivering configuration files to client" New topic
Author

Delivering configuration files to client

Fabio Piergentili
Ranch Hand

Joined: Sep 04, 2009
Posts: 57
I am trying to deliver configuration files to the client applications via jnlp. I know I have to sign the jars and also think that I need to extract the files from the jars via a classloader. Does anyone have an example of how to accomplish this? I am not sure how to extract and write the files to the clients file system.

Thank You
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

The usual way to get a resource (such as a configuration file) from one of the jars in an application's classpath is via the getResourceAsStream method of any of the classes in the application. Like this:

(The slash at the beginning of the URL says "Get the resource from the root of a classpath entry", but if the resource is in the same directory as the class in which this code is located, you can leave it off, making the URL relative to the class.)

I assume this should work just as well for a Web Start application as for any other application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Delivering configuration files to client
 
Similar Threads
Creation of icepdf-core.jar and icepdf-viewer.jar from ICEPDF.
Executable jar that contains other jars
Jasper Exception
packages/jars/libraries
NX:packaging suncertify.properties