Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java Webstart application

Posted on 2011-02-11
10
Medium Priority
?
652 Views
Last Modified: 2012-05-11
Following instructions here:

http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html

I create an xml file like so:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://developer.apple.com/java/javawebstart/apps/welcome" href="JWS_Demo.jnlp">
  <information>
    <title>My Application</title>
    <vendor>My Company</vendor>
    <homepage href="http://www.mycompany.com" />
    <offline-allowed />
  </information>
  <resources>
    <j2se version="1.5+" />
    <jar href="myjar.jar" />
  </resources>
  <application-desc main-class="mypackage.MyMainClass" />
</jnlp>

The jar file is in the same directory as the xml file.
Now what? How do I start the application?


0
Comment
Question by:allelopath
  • 5
  • 5
10 Comments
 
LVL 5

Expert Comment

by:aciuica
ID: 34873412
Normally you just need to double-click on your jnlp file.
But I think that you should change the codebase attribute - normally to the url where you want to place your jar and jnlp, but if you want tot test it locally you can use codebase="."
0
 
LVL 1

Author Comment

by:allelopath
ID: 34873488
Should this xml file have an extension "xml" or "jnlp"?
0
 
LVL 5

Accepted Solution

by:
aciuica earned 2000 total points
ID: 34873502
the extension should be jnlp
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:allelopath
ID: 34873531
ok. thx.
If I put "." (ie a period) for the codebase, I get this error:
BadFieldException[ The field <jnlp>codebase has an invalid value: .,.]
      at com.sun.javaws.jnl.XMLUtils.getAttributeURL(XMLUtils.java:102)
      at com.sun.javaws.jnl.XMLFormat.parse(XMLFormat.java:121)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:84)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:102)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:127)
      at com.sun.javaws.Main.launchApp(Main.java:408)
      at com.sun.javaws.Main.continueInSecureThread(Main.java:279)
      at com.sun.javaws.Main$1.run(Main.java:117)
      at java.lang.Thread.run(Thread.java:680)
0
 
LVL 5

Expert Comment

by:aciuica
ID: 34873676
You can try to remove this attribute.
0
 
LVL 1

Author Comment

by:allelopath
ID: 34873751
Tried that, on your suggestion. I get this error:

BadFieldException[ The field <jnlp>href has an invalid value: ccs.jnlp,ccs.jnlp]
      at com.sun.javaws.jnl.XMLUtils.getAttributeURL(XMLUtils.java:102)
      at com.sun.javaws.jnl.XMLFormat.parse(XMLFormat.java:139)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:84)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:102)
      at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:127)
      at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(LaunchDownload.java:152)
      at com.sun.javaws.Launcher.updateFinalLaunchDesc(Launcher.java:444)
      at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:256)
      at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:207)
      at com.sun.javaws.Launcher.launch(Launcher.java:124)
      at com.sun.javaws.Main.launchApp(Main.java:447)
      at com.sun.javaws.Main.continueInSecureThread(Main.java:279)
      at com.sun.javaws.Main$1.run(Main.java:117)
      at java.lang.Thread.run(Thread.java:680)
0
 
LVL 5

Expert Comment

by:aciuica
ID: 34873822
ccs.jnlp is the name of your jnlp file?
0
 
LVL 1

Author Comment

by:allelopath
ID: 34873842
yes, sorry, i had just put a generic example up on the first post.
0
 
LVL 1

Author Comment

by:allelopath
ID: 34873955
What would the local ip address of my machine be? (e.g. 192.168.0.1?)
Macbook Pro, OS X 10.6
0
 
LVL 5

Expert Comment

by:aciuica
ID: 34874396
It seems to be a problem with specify MAC OS path for codebase.
I'm sure that somebody else can advise you better here.
My last suggestion is to try to use one absolute Mac foder path for codebase attribute.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question