Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to provide Hostname as a JVM args in JNLP ?

888363Sep 15 2011 — edited Sep 15 2011
Hi All,

I am trying to provide the dynamic computer name where the JNLP runs. We have a shared infrastructure and the JNLP file get launched in different Windows machine all the time. I need the -D option in JNLP which should return the computer name of the windows machine where its running .

I am using the below in the server side ( Linux ) Java process and its working fine ,

h2. -Dapp.hostname=$HOSTNAME

And the below in the JNLP file ,

h2. <Property name="app.hostname" value=%COMPUTERNAME%/>


However the JNLP is not returning the correct hostname. Plz advice ,

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2011
Added on Sep 15 2011
2 comments
753 views