1

I've made a Java program I would like to make available to people of every stripe of computer (Windows, Linux, and OSX). So, as far as I know, all I have to do is make a Java archive, and the end users are able to run it with their particular flavor of Java.exe file.

If the above is correct, my questions are :

1) Is it possible to download each of the three kinds of Java.exe file from somewhere and package them together with the Jar file (do the end users have to have more than the appropriate Java.exe file to run the Jar file)

2) Is there a utility with which I can make the appropriate kind of zip file for each of the three kinds of destination machine (i.e., zip file, gzip file, and from what I have found on the web, an OSX zip file).

1
  • java.exe (or whatever it is named on other systems) alone is not sufficient to execute a Java program. You need a full virtual machine, which consists of a lot of more files. (Simply compare the download size with the size of your java.exe to see that there must be more.) Commented Jun 6, 2011 at 10:25

2 Answers 2

2

These days, java is considered a mainstream OS add on, like adobe reader, flash, and other very common "plugins".

Including java with your distribution is a very bad idea. Mainly because it's big and you then take on supporting latest releases.

Just send out the jars etc and perhaps a some shell scripts (.bat for windows and .sh for unix/linux) to start up your app. This is a common patter used by mainstream open source software, including Apache Tomcat, which is used by 1000's of sites.

If you want to get fancy, your scripts could detect if java is installed and redirect the user to the appropriate download page to install java.

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

Comments

1

The best strategy if your app. has a GUI & you can distribute from a web site is to deploy the app. using Java Web Start. Use deployJava.js to (help) ensure the end user has a suitable minimum version of the JRE.

Note that even that will not work to get the app. running on all computers. Some have no JRE and no user permissions to install one.

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.