install and execute a non java program

Hello,

i need to do a web page that an user click a hiperlink and then download a non java program, install it and execute.

can i do it with java web start and jnlp?

can i packaging the program in a jar, and the main class install the program and execute it?

thanks in advance,

C閟ar.

[320 byte] By [cesar.fga] at [2007-11-27 8:42:04]
# 1

Yes you can do this.

You have to package it inside your JAR, and then write your own copyfile.

For instance you have Main.java. You may put things in an installer directory at the same level as your Main.java.

You can then get an input stream to it using this call:

Main.class.getResourceAsStream("installer/file.exe");

You can then use that input stream to write it anywhere on the user's machine... assuming your JAR's are signed.

garrytana at 2007-7-12 20:41:16 > top of Java-index,Desktop,Deploying...