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