contactabbas
contactabbas

Reputation: 832

What is the exploded path of a jar downloaded by jnlp?

I have a web app. packaged as a jar file and served by Java Web Start using jnlp. When the user runs my program, it generates an excel file, which is to be shown by a web page within the same app.

The question is: where should my java class write the excel file so that the web page is able to locate/serve it? Obviously, web page can read from within the web app only (sandbox). But the only handle that I can get to the jnlp downloaded app is the jar file (which is not modifiable at runtime) and not EXPLODED jar file contents. If I am able to locate and write to the exploded jar file contents, I can write my excel file there to be picked up by the web page.

Any help? Any alternatives?

Upvotes: 0

Views: 83

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168825

..where should my java class write the excel file so that the web page is able to locate/serve it?

Write it to a sub-directory of user.home. Either that or to the temp.dir (spelling?).

Either of those apps. should be writable be a Java app. without special permissions (e.g. running as root).

Upvotes: 1

Related Questions