We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Create JNLP

ellandrd
ellandrd asked
on
Medium Priority
1,659 Views
Last Modified: 2011-10-03
How to do the above?  

I've got my JAR file and i was advised to distribute my JAR using Java Web Start.  
Comment
Watch Question

zzynxSr. Software engineer
CERTIFIED EXPERT
Commented:

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Anything easier to follow?

Alot of reading in that - havnt much time on my hands...
Commented:
Here's mine customized it with your own :

<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp spec="1.5+"codebase="http://www.myjavaserver.com/~jmsoan/cube-j/" href="CubeJ.jnlp">
  <information>
    <title>Cube-J Java IDE</title>
    <vendor>By : Jan Michael Soan</vendor>
    <homepage href="docs/help.html"/>
    <description>CubeJ Demo Application</description>
    <description kind="short">A demo of the capabilities
    of CubeJ Java IDE.</description>
    <offline-allowed/>
  </information>
  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.2+" java-vm-args="-esa -Xnoclassgc"/>
    <jar href="CubeJ.jar"/>
  </resources>
  <application-desc main-class="com.soan.jm.JRunProperty"/>
</jnlp>

Author

Commented:
i dont understand - your giving me this xml type file but what do i do with it?
Commented:
Here's how you validate the Jar Application that you will use for your JNLP :

Creating a Key:
c:\javac\javac\bin\keytool -genkey -keystore passKey -alias YourAlias

Verifying a Key:
c:\javac\javac\bin\keytool -list -keystore passKey

Creating a Jar File:
c:\javac\javac\bin\jar -cvfm Your.jar Manifest.MF com/*.* icons/*.*

Signing a Jar File:
c:\javac\javac\bin\jarsigner -keystore myKeystore Your.jar YourAlias

Hope that helps . . .
Javatm

Commented:
> i dont understand - your giving me this xml type file but what do i do with it?
That's the entire JNLP file demo that you can customize for your webstart ;)
Commented:
1. 1st you have to create a JNLP file.
2. You have to create a Key.
3. You have to create your Jar for your Application.
4. You have to sign your Jar using your key.
5. You can now deploy it over the web and call your JNLP like :
<a href="CubeJ.jnlp">click here</a>

Author

Commented:
but in order for the user to call myapp.jnlp, they need JRE installed first right?

Commented:
Yes

Commented:
If they dont have java it will tell them and that should let them know that they need to use one.

Author

Commented:
OK

i'll give it ago and if i get into problem i'll get back to you, otherwise i'll be accepting your solution...

Commented:
ok thanks ;)

Author

Commented:
what do i call the xml file? whats its extension?
Commented:
Simple as YourFile.jnlp

Author

Commented:
cheers guys!

Commented:
Thanks for accepting glad I could help ;)
zzynxSr. Software engineer
CERTIFIED EXPERT

Commented:
Thanx 4 axxepting

Author

Commented:
should it take long to start?

look here:

http://www.seandelaney.co.uk/javawebstart/pocketcalculator/readme.html

try it...

its been on checking latest version for about 5 mins now...

and when i try yours (Cube-J) its done in about 1min....

p.s did you create Cube-J?

here is my pocketcalculator.jnlp file:

<?xml version="1.0" encoding="utf-8" ?>
<!-- JNLP File for PocketCalculator Application -->
<jnlp spec="1.5+" codebase="http://www.seandelaney.co.uk/javawebstart/pocketcalculator/" href="PocketCalculator.jnlp">
      <information>
            <title>Pocket Calculator</title>
            <vendor>Sean Delaney</vendor>
            <homepage href="etc/help.html" />
            <description>Java Web Start Pocket Calculator Application</description>
            <description kind="short">A Pocket Calculator that supports floating point calculations for the basic operations addition, subtraction, multiplication and division.</description>
            <icon href="etc/logo.png"/>
            <offline-allowed />
            <shortcut online="false">
                  <desktop></desktop>
                  <menu submenu="Sean Delaney"></menu>
            </shortcut>
      </information>
      <security>
            <all-permissions />
      </security>
      <resources>
            <j2se version="1.4.2+" />
            <jar href="sPocketCalculatorApp.jar" />
      </resources>
      <application-desc main-class="u0207372.gui.PCStandalone" />
</jnlp>

Author

Commented:
oops its just started now... asking me if i want desktop icons...

think I didnt have the latest JRE... so i was updating it for me...

Commented:
> p.s did you create Cube-J?
Yap I created it and the site itself ;)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.