Ilyvatar
Ilyvatar

Reputation: 41

Get JNLP file name from the launched program

Is it possible to determine JNLP file name from the launched thru Web Start java program?

Upvotes: 3

Views: 595

Answers (2)

Sr. Java Developer
Sr. Java Developer

Reputation: 21

System.getProperty("jnlpx.origFilenameArg")

Upvotes: 2

Andrew Thompson
Andrew Thompson

Reputation: 168825

At he moment, the only way I know how to do that is to add a property with the JNLP href as the value. The application can add that to BasicService.getCodeBase() to construct the URL to the JNLP file.


Why do you need this information?

It's necessary for statistic needs.

If you want to determine hits on the JNLP, those will be revealed in the server logs. If it is necessary to determine 'number of successful launches', then add the HREF into the JNLP as a property and have each app. reach back to the server (to an 'app. phone home' page) once it is started.

Upvotes: 1

Related Questions