wood burning stoves 2.0*
The moose likes JNLP and Web Start and the fly likes setting system property -D option in JNLP file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "setting system property -D option in JNLP file" Watch "setting system property -D option in JNLP file" New topic

setting system property -D option in JNLP file

sathi rv

Joined: May 05, 2004
Posts: 7
I am able to execute my client from command prompt using :
java -Djavax.net.ssl.trustStore=myKeyStore -Djavax.net.ssl.trustStorePassword=myPassword MyClient
But now, I want to deploy MyClient using WebStart. any idea on how i can configure the above -D option in JNLP file?
thanks for any help.
sathi rv

Joined: May 05, 2004
Posts: 7
nobody to help me out :-(
Jim Tonn

Joined: Apr 28, 2004
Posts: 4
You should be able to specify runtime properties in your JNLP file using the property tag, e.g.,

See the vamphq JNLP tag reference for more information. There are also good FAQs at that site.

Venkat Ram Reddy Kolla

Joined: Sep 30, 2008
Posts: 1
I have same problem. Please give me the solution.
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

Venkat, adding a post like that to an old post is not a good idea. If you have the same problem, then why isn't the answer already given the answer to your problem?
Paul Balm
Ranch Hand

Joined: Dec 13, 2008
Posts: 63
The suggested approach (to add the property to the resources section in the JNLP file) in Java 6 only works for "secure" properties. Properties are considered secure in this context if they start with "javaws." or "jnlp." -- so the example doesn't work -- at least not in Java 6.
In Java 5, I think it does work, but if your user has Java 6 instead, (s)he'll be in trouble.

In my case I've solved it by passing the property on the command line:
> javaws -J-Dcom.my.prop=hello thefile.jnlp

SCJP 1.4 -- SCJD Java 2 -- OCM JEA 5
I agree. Here's the link: http://aspose.com/file-tools
subject: setting system property -D option in JNLP file
Similar Threads
Getting the hostname from command line - Is it a violation from Instructions.
Need To Create A JNLP file for a swing application
Download Swing application from web
Opening files with .jnlp extension in IE 9 (Windows 7)
Signing JNLP - Where does JNLP-INF directory go?