I have a Java program that I have been working on. I would like to show it to my girlfriend, who would have no clue as to how to work with Java, and make it easy for her to do so. I understand the first step is to compile it to .class ‘s from the command line, but after that I am clueless.
I would be interested in finding out how to do this both for Windows and Mac OS (I am on a Mac, along with my girlfriend, but my school uses Windows computers).
I have been on Oracle and seen their demos, they download as .jnlp, is that a step in the right direction?
And specifically, I am looking for a “file” of some sort that is simply downloaded and launched, no terminal involved (maybe a file with a command line within?).
The title and that quote typically represent two different ways to launch Java desktop apps.
Either strategy will work on OS X, Windows or *nix, but the first has JRE versioning (making sure the end user has a JRE, and it is recent enough to run the code) assisted by scripts, and many other ‘bells and whistles’.
Java Web Start
deployJava.jswill check her PC has a suitable minimum version of Java to run the app. If not, she will be guided through a process to get it.If the user chooses Run ..
Executable Jar
Another lesser alternative is an executable-jar.
It uses a
manifest.mfin the Jar that specifies the main class.While being a lesser experience for the end user, it is also simpler for the developer – a trade off that might come in handy for limited distribution.