Running Eclipse on Mac OS X with Java 6

I just discovered from @bact’s blogpost that I can use Java 6 as a default JVM on Mac OS X, I’m really happy with that even I’m now “not-too-frequent” use Java on this Mac OS X box.

But seems Apple’s Java is not a developer friendly, this error message during launching Eclipse fustrated me.

Picture 1

But everything has a solution, after googled around for a bit while, I found this blog post, and everything works.

This reminds me how evil Apple is.

8 thoughts on “Running Eclipse on Mac OS X with Java 6

  1. 3.4.2 มันไม่เป็นนะ แต่ 3.2 เป็น (แล้วก็หาทางแก้ไม่ได้อีกต่างหากถ้าใช้ Aptana)

  2. แปลกแฮะ ตอนผมตั้ง default java ผมใช้ Java Preferences (ใน Utilities) แล้วเลือก Java SE 6 (64-bit) -> J2SE 5.0 (32-bit) -> J2SE 5.0 (64-bit) -> J2SE 1.4.2 (32-bit) ตามลำดับบน-ล่าง

    ลองพิมพ์ java -version มันก็แสดงตัวว่ามันเป็น java 6 นะ (java version 1.6.0_07)

    แต่ค่าที่แสดงใน config ของ eclipse มันก็เลือก Java 5 ให้ผมเอง (ไม่ได้ไปแก้ Info.plist ด้วย) แล้วก็ใน Installed JREs มันดันแสดงว่า JVM 1.5.0 (Mac OS X Default) ซะงั้น

    ออ แถม ผมลองกับตัว 3.5 (Cocoa x64) มันก็ขึ้นเหมือนตัว 3.4.2 เลย (แค่ arch บอกว่ามันไม่ใช่ x86)

  3. คือ ผมสงสัยวิธีที่ตั้ง Default Java โดยทำผ่าน Command กับทำผ่าน App นี่มันต่างกันอย่างไร ทำไมหลายๆ คนถึงเลือกที่จะทำผ่าน Command หรือเพราะทำผ่าน App มันไม่ใช่ Java 6 แท้?

  4. เพราะจะใช้ Java 6 ไง update ที่มันให้มาเป็น Java 5 นิ

  5. ออ ผมก็นึกว่า Java Preferences มันจะแก้ CurrentJDK ให้ด้วยเสียอีก

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>