views:

43

answers:

2

I have a java application that reads a resource folder containing a bunch of .jar files. For some of these .jar files corresponding JNLP files must be created based on default schema and stored in the same directory.

Are there good approach to create these JNLP file from a java application (and maybe add some data from the .jar files into jnlp nodes) ?

A: 

A good approach may be to start from the existing Ant-JNLP-War task. Either script Ant to do what you want, or make use of the code directly.

Brian Agnew
Hm ok I would like to only depend on the java jdk. I have found this script: http://github.com/jponge/izpack-utils/blob/izpack2jnlp/izpack2jnlp/izpack2jnlp.py but is it not possible to do the same with the java api?
tul
The point about reusing another API/library is that someone has already done a huge amount of heavy lifting for you.
Brian Agnew
+1  A: 

It's basically an XML file. Any XML API could do it. Personnaly, I would go with the JAXB API if I had to create a JNLP file dynamically.

Nik