Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 7 installer for Mac/Windows

I am programming software in Java 7. The users of the software are not all up to date (especially the Mac users). Therefore I need an installer (Windows/OSX) that can be easily integrated with the software installation. There is a normal installer for Windows 7 so I am especially focused on finding one for the Mac. Bonus points if it can check for XCode and other requirements too).

I am thinking another option would be to just use some of the libraries from Java 7 (for example the file-system library). However, I think this might not be possible due to the version number in the compiled classes? I couldn't use a Java 6 compiler to compile these libraries either (because they are Java 7 code).

I don't think I am the only one with this problem. There must be a solution somewhere, but I haven't found it.

Any help would be appreciated.

like image 744
headgrowe Avatar asked Mar 08 '26 11:03

headgrowe


2 Answers

For the best user experience I would recommend using PackageMaker to create a .pkg file which you can then give to your Mac users. That allows them to do a single click-to-install of your app.

Within the package you would bundle your app archive (JAR file), any necessary resources and two scripts, one to check for the existence of Java 7 on the target system, and the other to install it if not found. I would recommend bundling the latest version of OpenJDK7 with your pkg, at least until an official Java 7 SDK is released for the Mac.

like image 69
Perception Avatar answered Mar 10 '26 03:03

Perception


JAva 7 is not yet officially supported on Mac OS X, if you are looking for a JAva 7 installer for mac Os X take a look at openjdk-osx-build project on Google Code.

like image 37
aleroot Avatar answered Mar 10 '26 01:03

aleroot