File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes Do I need a web server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Do I need a web server?" Watch "Do I need a web server?" New topic

Do I need a web server?

Mike Birken

Joined: Dec 28, 2001
Posts: 20
Do I need a web server to make an application into a web start application? The advantage of applets were that I could just place them with my html files on someone elses server and it would dish them out just like any other file. Is there any way I can use web start with the account that came with my DSL connection (very limited account that I don't have direct server access to) for example?
- Mike
Mauro Marinilli

Joined: Feb 20, 2002
Posts: 27
Yes of course!
Instead of placing your applet files your publish JNLP file(s) and JAR file(s), together with whatever you need more.
But wait; there is a subtlety: you have to add a new MIME typetoyour web server, that special one for JNLP files (see JNLP documentation or my book). Contact your webadmin to be sure they have such a MIME type added to their web server.

Mauro Marinilli, author of Java Deployment with JNLP and WebStart
Visit the Juniper Project.
Latha Kalaga
Ranch Hand

Joined: Nov 13, 2000
Posts: 96
Hi Mauro,
My understanding is that you add a new mime type to your browser such that when it comes across a JNLP link, it knows what to do.
What is a JNLP file? I thought through Web Start, you can only deliver jar files.
Hema Menon
Ranch Hand

Joined: Oct 29, 2000
Posts: 569
JNLP file is nothing but an XML file. It contains information on the application(the logo, company details), securtiy information, the resources(which specify the jar files, native libraries, system properties etc) and application descriptors.
The webserver needs to return the right mime type when a link is accessed by a user. The webserver should return the mime type as application/x-java-jnlp file.

Wouter Zelle
Ranch Hand

Joined: Apr 12, 2002
Posts: 30
JNLP specifies the format of an XML-file that describes the application. It tells the Web Start plugin where to find the jars, who created it, what it is, a homepage with more info, requirements, etc. Basically all the stuff that the Web Start plugin wants to show to the user or needs to install your application correctly.
You put a link to the JNLP-file in your HTML and the plug-in takes care of the rest. Quite convenient.
PS. Here you can find more info on the JNLP file format.
[ April 18, 2002: Message edited by: Wouter Zelle ]
Hema Menon
Ranch Hand

Joined: Oct 29, 2000
Posts: 569
You can use <nativelib> tag to specify native libraries like dll's if your java application uses one. It should be packaged as a jar and the application should be able to use System.loadLibrary to get the native libraries for use.
I agree. Here's the link:
subject: Do I need a web server?
It's not a secret anymore!