Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java Webstart application

Posted on 2011-02-11
10
Medium Priority
?
625 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.
Suggested Courses

721 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