{"id":65,"date":"2008-05-09T11:37:59","date_gmt":"2008-05-09T18:37:59","guid":{"rendered":"http:\/\/codefork.com\/blog\/index.php\/2008\/05\/09\/eclipse-and-jdk-160_05-on-mac-os\/"},"modified":"2008-05-12T10:23:17","modified_gmt":"2008-05-12T17:23:17","slug":"eclipse-and-jdk-160_05-on-mac-os","status":"publish","type":"post","link":"https:\/\/codefork.com\/blog\/index.php\/2008\/05\/09\/eclipse-and-jdk-160_05-on-mac-os\/","title":{"rendered":"Eclipse and JDK 1.6.0_05 on Mac OS"},"content":{"rendered":"<p>Last week, Java 1.6 went out of Developer Preview and became an <a href=\"http:\/\/www.apple.com\/support\/downloads\/javaformacosx105update1.html\">&#8220;official&#8221; release<\/a> for Mac OS 10.5.2. (You still can&#8217;t get 1.6 for 10.5.1, sadly.) I&#8217;ve been fiddling with 1.6 and Eclipse, trying to get them to play well together, and here&#8217;s what I&#8217;ve found so far.<\/p>\n<p>Eclipse itself needs to run on 1.5. There&#8217;s a great blog post, <a href=\"http:\/\/blog.kischuk.com\/2008\/05\/08\/running-eclipse-on-macbooks-with-java-6\/\">&#8220;Running Eclipse on MacBooks with Java 6&#8221;<\/a>, written by one &#8220;rkischuk,&#8221; that explains why: 1.6 doesn&#8217;t support 32-bit SWT-Cocoa bindings, so Eclipse will bomb. The error I got was a mysterious &#8220;JVM Terminated. Exit code=-1&#8221; and a list of run-time options. If you run Eclipse from a shell, you might see this:<\/p>\n<p><code>2008-05-09 10:53:55.443 eclipse[257:10b] Cannot find executable for CFBundle 0x116030 <\/System\/Library\/Frameworks\/JavaVM.framework> (not loaded)<\/code><\/p>\n<p>or maybe this:<\/p>\n<p><code>_NSJVMLoadLibrary: NSAddLibrary failed for \/System\/Library\/Frameworks\/JavaVM.framework\/Versions\/CurrentJDK\/Libraries\/libjvm.dylib<br \/>\nJavaVM FATAL: Failed to load the jvm library.<\/code><\/p>\n<p>When I installed 1.6, I had messed around with \/System\/Library\/Frameworks\/JavaVM.framework\/Versions, trying to get 1.6 to run as the system default. But the cleanest solution for me was to KEEP 1.5 as the default. So make sure that directory looks like this: <\/p>\n<p><code>drwxr-xr-x  11 root  wheel  374 May  9 10:49 ..<br \/>\nlrwxr-xr-x   1 root  wheel    5 May  5 22:41 1.3 -> 1.3.1<br \/>\ndrwxr-xr-x   3 root  wheel  102 Nov  2  2007 1.3.1<br \/>\nlrwxr-xr-x   1 root  wheel    5 Apr 18 13:07 1.4 -> 1.4.2<br \/>\nlrwxr-xr-x   1 root  wheel    3 May  5 22:41 1.4.1 -> 1.4<br \/>\ndrwxr-xr-x   8 root  wheel  272 Apr 27  2007 1.4.2<br \/>\nlrwxr-xr-x   1 root  wheel    5 Apr 18 13:07 1.5 -> 1.5.0<br \/>\ndrwxr-xr-x   8 root  wheel  272 Apr 27  2007 1.5.0<br \/>\nlrwxr-xr-x   1 root  wheel    5 May  5 22:41 1.6 -> 1.6.0<br \/>\ndrwxr-xr-x   8 root  wheel  272 Apr 18 14:03 1.6.0<br \/>\ndrwxr-xr-x   9 root  wheel  306 May  9 10:50 A<br \/>\nlrwxr-xr-x   1 root  wheel    1 May  9 11:13 Current -> A<br \/>\nlrwxr-xr-x   1 root  wheel    3 May  9 11:12 CurrentJDK -> 1.5<\/code><\/p>\n<p>Eclipse should run as it normally does.<\/p>\n<p>If your code project(s) don&#8217;t require SWT, you can use 1.6 as an Installed JRE within Eclipse. Go to Preferences -> Java -> Installed JREs -> Add&#8230;. Select &#8220;Mac OS VM&#8221; and point it to:<\/p>\n<p>\/System\/Library\/Frameworks\/JavaVM.framework\/Versions\/1.6.0\/Home <\/p>\n<p>Building projects and running JBoss using the 1.6 seems to work just fine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, Java 1.6 went out of Developer Preview and became an &#8220;official&#8221; release for Mac OS 10.5.2. (You still can&#8217;t get 1.6 for 10.5.1, sadly.) I&#8217;ve been fiddling with 1.6 and Eclipse, trying to get them to play well together, and here&#8217;s what I&#8217;ve found so far. Eclipse itself needs to run on 1.5. &hellip; <a href=\"https:\/\/codefork.com\/blog\/index.php\/2008\/05\/09\/eclipse-and-jdk-160_05-on-mac-os\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Eclipse and JDK 1.6.0_05 on Mac OS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,15],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-java","category-macos"],"_links":{"self":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}