views:

443

answers:

3

Customer X has asked for ways to improve the startup time of a Java process he uses. The problem is, it is not run through a jar file, but rather 'jnlp' (which I am assuming indicates it is a java webstart application)

StartUserWorx.jnlp

Is there a way to convert this to a JAR file and then have the user invoke the application locally, and include a startup flag to the JRE to allocate more ram to the process?

The user is getting a bit frustrated, because other workers in the same office use the same application on almost identical machines, and yet his process seems to always take a much longer time to load (a few minutes rather than a few seconds).

+1  A: 

Check the proxy settings on the slow machine. That user might not have correct proxy settings, and a lot of extra network traffic/timeouts could be occurring?

We've had that issue with webstart before, downloading a jar from a local server was round tripping through the proxy to the other coast and back.

John Gardner
+1  A: 

Hi, if you use something like Notepad to view the contents of the .jnlp file, you'll see all the information it uses to run.

Look for main-class (on the application-desc node). This is the java class containing the main method. For more information you should refer to http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp for the specification of jnlp.

From here you could create a batch file with a proper classpath for running the application. But, you are breaking away any of the advantages of using the jnlp method. So you'll need to keep that in mind.

There is also a section 'resources' in the jnlp file which will show you jar files it requires and other webstart jnlp's.

You should be doing some checks outside of the actual application though. If these are similar machines, then it's very likely something is different. Defrag needed? Network? Maybe the java-vm itself is taking too long to load.

+1  A: 

Check the network settings of the user. It is my experience that minute long delays often is caused by DNS misconfiguration, bad routing tables (DNS must time out when no positive response is received), or simply an incorrect lmhosts file.

Thorbjørn Ravn Andersen