Problem description: Mac OS 10.9.1 with ONLY Java 7 Update 51 installed (64bit) and LibreOffice 4.2.0.4 64bit. When go to Preferences - Advanced am immediately asked by Mac OS if want to install Apple's Java 6. Hit no. Java 7 shows as an available version of Java. Click radio button. Am told LibreOffice needs to restart. Restart. Java is NOT enabled. Go to Preferences - Advanced and begin process over and over to infinity and beyond. Steps to reproduce:Same as problem description. 1. .... 2. .... 3. .... Current behavior: Expected behavior:Java 7 to be enabled. Operating System: Mac OS X Version: 4.2.0.4 release
Confirmed:4.2.0.4:OSX Not sure if this really broken in the sense of java 1.7 not being used. Maybe it's just not correctly displayed in the menu? LO > Preferences > Advanced For me as well neither Java 1.7 nor 1.6 is selected when visiting that dialogue. Proceed with Doc's repro steps (select 1.7 + restart), then reopen that dialogue and again nothing is marked. Setting to NEW. Pretty confusing for users.
*** Bug 50918 has been marked as a duplicate of this bug. ***
At least on a fresh OS X 10.9.1 with Apple's "Java for OS X" (<http://support.apple.com/kb/DL1572>) not installed and Oracle's Java 1.7.0_51 (<http://javadl.sun.com/webapps/download/AutoDL?BundleId=83377>) installed, against an --enable-64-bit build of current LO master, I observe two issues: (1) Doing anything in LO that requires Java, like "Tools - Macros - Organize Macros - BeanShell...", abruptly exits LO's soffice with exit code 97, after writing "No Java runtime present, requesting install" to stderr. (It may or may not first pop up Apple's stub window asking to install Java. Appears to me that it does so a couple of time and when you keep pressing "No" it eventually stops presenting the dialog.) The reason is that calling Oracle's JNI_CreateJavaVM exported from /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/server/libjvm.dylib internally calls into Apple's (stubbed-by-default) /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport, which then decides to call exit(1). This problem goes away once you do install Apple's "Java for OS X" (i.e., Java 6) alongside Oracle's Java 7. (And LO does run the Java 7 JVM then, not the Java 6 one, as can be seen, e.g., when modifying the BeanShell HelloWorld macro in "LibreOffice Macros" to include the result of System.getProperty("java.version") in the text inserted into a Writer document and reports "1.7.0_51".) (2) The "LibreOffice - Advanced" preferences pane shows "Oracle Corporation 1.7.0_51" as unselected, and when you select it (which causes the "For the selected Java runtime environment to work properly, LibreOffice must be restarted" dialog) it is nevertheless unselected again on the next visit. This problem appears unrelated to whether or not you also have Apple's "Java for OS X" installed, and appears to be only cosmetic, in that it does not affect the Java functionality in LO as discussed under (1).
Stephan Bergmann committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c697a99c90a40492eb8c16466a2082cc2be927e Related fdo#74597: Java on Mac doesn't use javaldx/library path fiddling The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4cf524e07e1b0355b418c19eae0dbf8771fb12be&h=libreoffice-4-2 Related fdo#74597: Java on Mac doesn't use javaldx/library path fiddling It will be available in LibreOffice 4.2.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The commit from comment 4 solves problem (2) from comment 3 (that selection of the Oracle JRE in the Advanced preferences pane doesn't stick, which is the problem originally reported in this issue). I'll see whether I can also improve the situation around problem (1) from comment 3 (LO exiting abruptly if Apple's "Java for OS X" isn't also installed), but mark this issue as FIXED for now.
Spawned issue 74877 for part (1) of comment 3 now.