stisti / jenkins-app

Make Jenkins behave like a Mac application to make it easier to manage.
246 stars 20 forks source link

Jenkins.app should check for Java runtime environment #27

Open jautero opened 9 years ago

jautero commented 9 years ago

If /usr/bin/ doesn't have Java tools installed, you get a dialog box prompting to install JRE. Since JRE actually doesn't contain necessary links, you will get the dialog box even if you have JRE installed. (See this: http://stackoverflow.com/questions/26483089/launchd-is-not-starting-jenkins-server-on-os-x-yosemite) Also, because Jenkins is started with launchd, you will get the dialog at regular intervals until the startup script timeouts. Startup script should at least test if the /usr/bin/java seems to work and if it doesn't exit without creating launchd job.

stisti commented 9 years ago

I did give this some thought but I did not come up with a good way to check if /usr/bin/java is a real java runtime or Apple's placeholder. Also, I did not have the placeholders anymore because I had already gotten the prompt and installed java. Do you have any suggestions how to check it or access to a Mac where java has not yet been installed?

stisti commented 9 years ago

Currently /usr/bin/java looks like this for me:

$ ls -l /usr/bin/java
lrwxr-xr-x  1 root  wheel  74  5 Jou 00:54 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java