3

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?

2
  • 1
    With a script almost everything is possible. Try some installation packs like IzPack or Launch4J Commented May 29, 2012 at 20:05
  • 1
    It will be better if you bundle the JRE along with your application. I use Launch4J for that purpose Commented May 29, 2012 at 20:24

5 Answers 5

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I might suggest downloading the JRE and packaging it up with your Java application in a self extracting executable(.exe) that the customer can just run. Use a program such as 7-Zip to turn a compressed(.zip) archive into an executable then have the executable extract the JRE to \temp and execute the JRE installer with the /s option mentioned above.
0

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.

NSIS

I'm not sure but I think you can also build the kind of installer you want.

Comments

0

Java supports automated/silent command line install on PCs. See here

You can also probably make use of batch scripts to automate some tasks...

Batch Files

Comments

0

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

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.