This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes problem during loading third party jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "problem during loading third party jar" Watch "problem during loading third party jar" New topic
Author

problem during loading third party jar

sitansu dey
Greenhorn

Joined: Nov 06, 2002
Posts: 3
Hi,
This is the code what I have written in my jnlp file.
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://www.ePeers.com/" href="test.jnlp">
<information>
<title>ePeers Application</title>
<vendor>Tata Consultancy Services</vendor>
<homepage href="http://www.ePeers.com/test.html"/>
<description>ePeers Application</description>
<description kind="short">A Peer to Peer Application.</description>
<icon href="images/icon.gif"/>
<offline-allowed/>
</information>
<resources>
<j2se version="1.3"/>
<jar href="test.jar" main="true" download="eager"/>
<jar href="lib/jxta.jar" main="false" download="eager"/>
</resources>
<application-desc main-class="com.Test"/>
</jnlp>
I am using Apache server. I have placed jxta.jar inside Apache Group\Apache\htdocs\lib directory and test.jar inside Apache Group\Apache\htdocs directory.
Now when I am trying to launch the application using java web start, the files RTtest.jar, RCtest.jar, RMtest.jar, ALtest.jnlp, ATtest.jnlp, AMtest.jnlp are copied in C:\Documents and settings\Administrator\.javaw\cache\http\Dwww.ePeers.com\P80 directory and the files RCjxta.jar, RMjxta.jar, RTjxta.jar are copied inside C:\Documents and settings\Administrator\.javaw\cache\http\Dwww.ePeers.com\P80\DMlib directory.
After that it is showing unable to launch the application with the following informations.
General:
An error occurred while launching/running the application.
Title: ePeers Application
Vendor: Tata Consultancy Services
Category: Unexpected Error
Environment incorrectly intialized.
Exception:
java.lang.IllegalStateException: Environment incorrectly intialized.
at net.jxta.peergroup.NetPeerGroupID.getURL(PeerGroupID.java:169)
at net.jxta.id.ID.toString(ID.java:146)
at com.Test.main(Test.java:8)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

This is my java code.
package com;
import net.jxta.impl.id.UUID.PeerGroupID;
public class Test
{
public static void main(String args[])
{
System.out.println("This is a test program.");
System.out.println("TEST ID:"+PeerGroupID.defaultNetPeerGroupID.toString());
}
}
In the java console I am getting output from the first line. But it is giving exception at the second line. The program is running successfully from the command prompt.
It seems that it is not loading jxta.jar
please help.
sitansu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem during loading third party jar