19 Replies Last post: Oct 22, 2009 2:22 PM by Lajos Doma  
Scott Mueller Newbie 23 posts since
Mar 4, 2008
Currently Being Moderated

Jan 17, 2009 9:24 AM

Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

I'm new to mac os x, so I'm not sure how to set IntelliJ IDEA 8 to run on JDK6 instead of JDK5 which the "About IntelliJ IDEA" menu item says I'm using.  What's the proper way for doing this?  I went to Applications -> Utilities -> Java -> Java Preferences and made Java SE 6 the top position for both the preferred Applet version and Java application version.  But that hasn't affected IntelliJ IDEA...  What do I do?

 

Tomcat also defaulted to JDK5, I had to look for JDK6 and set the JRE_HOME environment variable to "/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home" before starting tomcat in order to get it to use JDK6.  I want EVERYTHING to run on JDK6!!  But I'd be happy with at least intellij for now...

Paul Bienick Newbie 26 posts since
Nov 26, 2002
Currently Being Moderated
Jan 19, 2009 4:49 PM in response to: Scott Mueller
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Scott,

 

Do you have IntelliJ in the Dock? If so, CMD+CLICK it and it will open the Applications folder with the app highlighted. (nice tip, eh? :-) ) Right-click the app, and choose "Show Package Contents...". Double click the Contents directory. Now you want to edit the Info.plist file. Either double click it to open it in the plist editor (not sure if you have to have the Apple developer tools to get this editor or not), or open it in a text editor (this particular plist file is in XML format). Find the Java section, and the entry for JVMVersion. Change 1.5* to 1.6*, restart IntelliJ, and you're all set.

 

Note that some have reported trouble with using IntelliJ with 1.6. You may need to increase the maximum amount of memory that the JVM uses. You can achieve that within the Info.plist file as well.

Paul Bienick Newbie 26 posts since
Nov 26, 2002
Currently Being Moderated
Jan 20, 2009 4:33 PM in response to: Scott Mueller
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

I'm really not sure why the default is 1.5. Any idea if it's the same for other platforms? I read someshwere that JDK 1.6 on OS X is buggy, but I haven't confirmed this yet.

Dmitry Jemerov JetBrains 11,356 posts since
Aug 19, 2002
Currently Being Moderated
Jan 23, 2009 7:46 PM in response to: Paul Bienick
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Hello Paul,

 

I'm really not sure why the default is 1.5. Any idea if it's the same

for other platforms? I read someshwere that JDK 1.6 on OS X is buggy,

but I haven't confirmed this yet.

 

On other platforms the default JDK is 1.6. On MacOS X the JDK 6 is 64-bit

only (which means significantly larger memory consumption) and less stable

than JDK 1.5.

 

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

 

 

 

Guest
Currently Being Moderated
Jan 23, 2009 7:46 PM in response to: Dmitry Jemerov
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

On MacOS X the JDK 6 is

64-bit only (which means significantly larger memory consumption) and

less stable than JDK 1.5.

 

Does that also mean, on Win64 it is better to take the 32-bit or 64-bit Java

1.5 because it is more stable than 64-bit Java 1.6?

 

Tom

 

Dmitry Jemerov JetBrains 11,356 posts since
Aug 19, 2002
Currently Being Moderated
Jan 23, 2009 7:49 PM in response to: Tom
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

No. The stability problems are specific to the Apple version of the 1.6 JDK. On Windows, Java 1.6 is more stable than Java 1.5.

Sander Verbruggen Newbie 1 posts since
Apr 1, 2009
Currently Being Moderated
Apr 1, 2009 1:06 PM in response to: Paul Bienick
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Changing Info.plist with 'vi' as you described results in an error when starting IntelliJ. If I do 'open -a /Applications/IntelliJ\ IDEA\ 8.1.app', it gives the error

 

LSOpenFromURLSpec() failed with error -10810.

 

No matter what I try (1.6 without the asterisk, 1.4), it only seems to run when 1.5* is given...

Antoni Batchelli Newbie 5 posts since
Sep 6, 2002
Currently Being Moderated
Jun 16, 2009 7:33 AM in response to: Sander Verbruggen
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Same issue here. I get the following on the logs:

 

 

6/15/09 8:32:05 PM [0x0-0x3e03e].com.jetbrains.intellij[454] [JavaAppLauncher Error] unable to find a version of Java to launch

6/15/09 8:32:05 PM com.apple.launchd[131] ([0x0-0x3e03e].com.jetbrains.intellij[454]) Exited with exit code: 1

6/15/09 8:32:33 PM [0x0-0x40040].com.jetbrains.intellij[457] [JavaAppLauncher Warning] Java application launched from PPC or bad stub. Relaunching in 32-bit, and tagging sub-processes to prefer 32-bit with $JAVA_ARCH=i386.

6/15/09 8:32:33 PM [0x0-0x40040].com.jetbrains.intellij[457] [JavaAppLauncher Warning] Java application launched from PPC or bad stub. Relaunching in 32-bit, and tagging sub-processes to prefer 32-bit with $JAVA_ARCH=i386.

6/15/09 8:32:34 PM [0x0-0x40040].com.jetbrains.intellij[457] [JavaAppLauncher Error] This process is [i386] and was re-exec'd from [i386], but for some reason we are trying re-exec to [].



Jon Bodner Newbie 23 posts since
Sep 10, 2002
Currently Being Moderated
Jun 16, 2009 7:41 PM in response to: Antoni Batchelli
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Apple has only provided JDK 6 for 64-bit Intel Macs running Mac OS X 10.5.  PPC (32 and 64 bit) and older Intel (32 bit) Macs cannot use JDK 6.

 

There is a rumor that Apple will provide a 32-bit JDK 6 for Intel Macs in Snow Leopard, but I'll believe it when I see it.  There will never be an Apple-provided PPC JDK 6.

 

Landon Fuller has done work on getting OpenJDK 6 to run on the Mac:

 

http://landonf.bikemonkey.org/code/java/OpenJDK6_MacPorts.20090516.html

 

I was kinda-sorta able to get it to run IntelliJ on my 32-bit Intel iMac, but I wouldn't use it for everyday use.

 

Jon

Antoni Batchelli Newbie 5 posts since
Sep 6, 2002
Currently Being Moderated
Jun 16, 2009 8:56 PM in response to: Jon Bodner
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

I am using Core 2 Duo computers, with full 64 bit support. I used JDK6 with older versions of IDEA a few months ago.

 

I think that your comment pinpoints what he issue might be here. The IDEA launcher, for some reason, can't find the JDK6 on my computer. That is actually why it doesn't work. But that JDK is there and fully functional.

 

This could just be a bug in the lanucher.

k  Novice 125 posts since
Aug 22, 2002
Currently Being Moderated
Jun 16, 2009 10:12 PM in response to: Antoni Batchelli
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

yes, this used to work but now i'm getting the same error.  they've changed something in the launcher, i've tried a dozen different things and can't get IntelliJ to find JDK6... i get the same messages as in your post in the console

Dennis Meier Newbie 3 posts since
Jun 17, 2009
Currently Being Moderated
Jun 17, 2009 1:52 PM in response to: k
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

I used the JDK6 for months until 1 week ago. After installing a new java update (http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_4) the launcher isn't able to find the JDK6 anmore .. hmm, not sure where exactly the problem is. I'll try if I can remove that update, because I can't work on my projects with JDK5... :-(

Mariusz Nosinski Newbie 10 posts since
Oct 20, 2008
Currently Being Moderated
Jun 17, 2009 1:20 PM in response to: Dennis Meier
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

You no need launch IntelliJ with JDK 6 if you want to use this JDK in your projects. My IntelliJ working with JDK 5 and all projects use JDK 6 without any problems. All you need is set JDK 6 in Project Settings as Project JDK.

Dennis Meier Newbie 3 posts since
Jun 17, 2009
Currently Being Moderated
Jun 17, 2009 2:08 PM in response to: Mariusz Nosinski
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

Ok, that seems to work indeed. Thanks for your help. But what doesn`t work completly now is the JFormDesigner-PlugIn: When a form which contains beans from other modules in the project (all set to language level and jdk 6) JFormDesigner throws a UnsupportedClassVersionError exception for each occurence:

 

java.lang.UnsupportedClassVersionError: Bad version number in .class file

 

Ok, so it seems as JFormDesigner is the one having problems with this (as far as I remember I set the JDK for IntelliJ to 1.6 in the plist in order to to fix that).

k  Novice 125 posts since
Aug 22, 2002
Currently Being Moderated
Jun 17, 2009 4:35 PM in response to: Dennis Meier
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

the suggestion in this thread worked for me

http://www.jetbrains.net/devnet/message/5240216#5240216

Dennis Meier Newbie 3 posts since
Jun 17, 2009
Currently Being Moderated
Jun 17, 2009 4:44 PM in response to: k
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

also works for me, great! thanks!

Lajos Doma Newbie 1 posts since
Oct 22, 2009
Currently Being Moderated
Oct 22, 2009 2:22 PM in response to: k
Re: Proper way to use JDK6 for IntelliJ IDEA itself on Mac OS X

The proposed solution worked for me too. Wrote a small article about all the necessary steps to run Idea with JDK6 on OSX: Mac OS X: Using IntelliJ IDEA on 64bit JDK6

More Like This

  • Retrieving data ...