I am writing an application using Java and I want to send it to the customer. But he doesn't have Java on his computer (OS Win XP). I want to automate the installation using command shell scripting. Is it possible?
-
1With a script almost everything is possible. Try some installation packs like IzPack or Launch4Jricharbernal– richarbernal2012-05-29 20:05:12 +00:00Commented May 29, 2012 at 20:05
-
1It will be better if you bundle the JRE along with your application. I use Launch4J for that purposeNitin Chhajer– Nitin Chhajer2012-05-29 20:24:27 +00:00Commented May 29, 2012 at 20:24
5 Answers
There is a /s option in JRE installer (see here), so basically you can.
However, you will have to somehow download JRE to client's workstation. I suggest using wget for this.
However, you can also use java-to-exe wrappers - JSmooth for example can automagically download JRE for you if it is not installed.
1 Comment
You can make it on a bat file and ship a folder with an embeddable JVM, nevertheless I found using NSIS very effective for shipping swing APPS.
I'm not sure but I think you can also build the kind of installer you want.
Comments
Java supports automated/silent command line install on PCs. See here
You can also probably make use of batch scripts to automate some tasks...
Comments
Type "/?" parameter for the installation exe in console in the folder were installer relies.
C:\TEMP>jdk-7u4-windows-x64.exe /?
There you see shortly parameter reference. /passive & /quiet are probably what you need, create a install.cmd with something like
cls
C:\TEMP>jdk-7u4-windows-x64.exe /quiet
echo installation complete
pause
Comments
I used the following batch. I had a little trouble understanding the parameteres but finally this worked for me and without installing sponsor toolbars.
"@echo off
copy "JavaSetup8u111.exe" "%USERPROFILE%\downloads\JavaSetup8u111.exe"
CD\
CD "%USERPROFILE%\downloads\"
start /B /WAIT JavaSetup8u111.exe /s SPONSORS=0