Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.jnlp

 
Heinz Elman
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
maybe I'm blind but I can't find the a link to download the javax.jnlp.* package. I use jdk1.4 and there is no jnlp-funktionality..or am I wrong?
regards,
Heinz
 
Michael Szul
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the link for the package:
http://java.sun.com/products/javawebstart/download-jnlp.html
You can also go to this page:
http://java.sun.com/products/javawebstart/
...and click on the Developer's Section on the left hand side of the page. You'll find the full specification for JNLP there as well as a developer's guide and package download link.
 
Heinz Elman
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
thanks for your reply:-) I had already downloaded this stuff but I didn't know how to compile my Classes. First I tried to put the jnlp.jar File into the jdk-extensions. But that seems not to work ?:-| Now I read that I can compile it with the command:
javac -classpath .;jnlp.jar *.java
that's what I'am trying now.
bye Heinz
 
Michael Szul
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just add the jar files to your classpath. For Windows 95, 98, and ME, modify your Autoexec.bat (under C:\) and for Window 2000, its under Environment in System in the Control Panel.
If you run a Unix based computer like me, modify your user variables. It's in a hidden file in your home directory (mine is called .bashrc).
I've always had better luck including the entire jar file in the classpath (/opt/Java/jre/lib/jnlp.jar or C:\Java\jre\lib\jnlp.jar) than putting it in the /ext folder under /lib.
As long as it's in your classpath, you should have anymore problems during compilation.
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will any one help how to start JNLP file through Java Web Start .

am using this article == http://java.sun.com/developer/technicalArticles/Programming/jnlp/

i have completed till jarsigner ... i dono how to call my JNLP file to our Java Web Start to run my application

error message :

An error occurred while launching/running the application.

Category: Launch File Error

The following required field is missing from the launch file: <jnlp>

+ ...

Exception Tab

MissingFieldException[ The following required field is missing from the launch file: <jnlp>]

at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)

at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)

at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)

at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)

at com.sun.javaws.Main.main(Unknown Source)



by
dhana
 
James Ridley
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dhana sekar:

MissingFieldException[ The following required field is missing from the launch file: <jnlp>]

It would seem your xml format is incorrect. Your jnlp should match what was posted in the tutorial:
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi James Ridley ,

Thanks ... i missed in XML file


<jnlp codebase="file:///C:/JCP/....

my mistake <jnlp codebase="C:/JCP/...

thanks..

by
dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi james ,,

now am getting this Error !!
General Tab: Java Web Start
An error occurred while launching/running the application.

Title: My Pirate!
Vendor: me
Category: Launch File Error

Could not find main-class mypirate.Startup in file:/C:/jakarta-tomcat-5.0.16/webapps/mypirate/mypirate.jar

and my XML file Main class calling like this:

<application-desc main-class="mypirate.Startup"/>

and my Java main class class :

package mypirate;
public class Startup {
....
public static void main(String[] args) throws Exception {
.......,,,
}
}

Exception Tab : frm java web start

</jnlp> ]
at com.sun.javaws.LaunchDownload.getMainClassName(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(Unknown Source)

By
dhana
 
James Ridley
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dhana sekar:

Exception Tab : frm java web start

</jnlp> ]
at com.sun.javaws.LaunchDownload.getMainClassName(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(Unknown Source)

I've only ever ran into that scenario in the following two instances,not to say there aren't more I haven't seen yet .
1) I didn't have the jar with the main class to run listed as the first <jar> element in the resources section.
2) The jar file didn't contain the class to run.

Can you verify both of these items are in place?
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi James,

am having one Query :
1. if am running Main method class in Java Web Start whether i want any webserver / application server to start my program through java web start..
2. if Yes where i want to configure .. and which file i want to configure... how ??

if U want Exact code what am using.. U can get from here
http://today.java.net/pub/a/today/2005/08/11/webstart.html
only i have changed my CodeBase
<jnlp codebase="file:///C:/jakarta-tomcat-5.0.16/webapps/mypirate" href="mypirate.jnlp"> except this line all are same as in the article

how i can include my application icon inside Java Web Start like Remote application shown by default like Draw4 App , Notepad App,MilitaryGame App etc..


thanks
Dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi James,

now i config my application to tomcat ... then i start my server and also Java Web Start ... my application is loading inside web start after that is start my application ..
it was throwing Error

1.An error occurred while launching/running the application.

Title: My Pirate!
Vendor: me
Category: Download Error

Unable to load resource: http://localhost:8080/mypirate.jnlp

2.<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080" href="mypirate.jnlp">
<information>
<title>My Pirate!</title>
<vendor>me</vendor>
<icon href="icon.png"/>
<icon href="splash.png" kind="splash"/>
</information>
<resources>
<j2se version="1.4+"/>
<jar href="taf.jar" main="true"/>
</resources>
<application-desc main-class="Startup"/>
</jnlp>
3. Exception
JNLPException[category: Download Error : Exception: java.io.FileNotFoundException: C:\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P8080\XMmypirate.jnlp1146039933990 (Access is denied) : LaunchDesc: null ]at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown Source)at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)at com.sun.javaws.Launcher.downloadResources(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(Unknown Source)
4.java.io.FileNotFoundException: C:\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P8080\XMmypirate.jnlp1146039933990 (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.sun.javaws.net.BasicDownloadLayer.download(Unknown Source)
atcom.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown Source)at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)at com.sun.javaws.Launcher.downloadResources(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(Unknown Source)

these are the details of the Error message ..

my file is not getting Download ..

by
dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi James,

now i config my JNLP file to my tomcat server..

if am calling my cilent system : error Connection Refuse..

by
dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have solve the problem..


code Base: http://120.3.23.13:8080 href="mypirate.jnlp"
ip address of U'r Server like :120:3:23:13

by dhana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic