Currently working IDEs

Erik Mattheis ironduck at mac.com
Tue Jan 18 19:03:16 PST 2011


I'm running OS X 10.6.6 on a MacBook Pro with Core 2 Duo. I installed OpenJDK with the installer from the openjdk-osx-build project <http://code.google.com/p/openjdk-osx-build/>. Next I downloaded Eclipse Classic 3.7.0 M4 for 64 bit Cocoa, expanded the archive and performed the following on the command line:


$ export JAVA_HOME=`/usr/libexec/java_home -version 1.7`
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
$ java -version
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-b00)
OpenJDK 64-Bit Server VM (build 20.0-b03, mixed mode)
$ cd Downloads/eclipse
$ java -XstartOnFirstThread -jar plugins/org.eclipse.equinox.launcher_1.2.0.v20101119.jar -os macosx -ws cocoa -arch x86_64
***WARNING: Display must be created on main thread due to Cocoa restrictions.
An error has occurred. See the log file


The log file contains the following:

!SESSION 2011-01-18 21:59:30.420 -----------------------------------------------
eclipse.buildId=I20101208-1300
java.version=1.7.0-internal
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -os macosx -ws cocoa -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2011-01-18 21:59:40.043
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4091)
	at org.eclipse.swt.SWT.error(SWT.java:4006)
	at org.eclipse.swt.SWT.error(SWT.java:3977)
	at org.eclipse.swt.widgets.Display.error(Display.java:1040)
	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:807)
	at org.eclipse.swt.widgets.Display.create(Display.java:790)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:681)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:672)
	at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:708)
	at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
	at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:145)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)





On Jan 18, 2011, at 8:55 PM, Mike Swingler wrote:

> I am uncertain why -XstartOnFirstThread did not work for you. The support has been in the BSD port for quite a while:
> <http://hg.openjdk.java.net/macosx-port/macosx-port/jdk/file/a91793b807d5/src/share/bin/java.c>, line 1033.
> 
> This may require a proper bug with steps to reproduce (and a proper bug reporter to file it into). ;-)
> 
> Regards,
> Mike Swingler
> Java Engineering
> Apple Inc.
> 
> On Jan 14, 2011, at 5:05 PM, Erik Mattheis wrote:
> 
>> I had run across the blog posts you mentioned before I posted to the list. I dismissed them earlier since they seemed dated and it seemed like Henri was using Eclipse seamlessly with OpenJDK.
>> 
>> Also, I never had a problem using the OpenJDK as a JRE within Eclipse for compiling and running - that works fine except for having to manually enter the path to the JDK as you mentioned.
>> 
>> I still don't know how (or if it's even possible) to actually launch Eclipse using OpenJDK. If you simply edit the eclipse.ini and add a -vm argument pointing to the java executable, Eclipse launches, but if you got to 'About Eclipse' in the application menu, click 'Installation Details' and select the 'Configuration' tab, you'll see that Eclipse is actually running on the Apple 1.6 JDK. Attempting to manually launch Eclipse using the OpenJDK java executable like this:
>> 
>> `/usr/libexec/java_home --version 1.7`/bin/java -jar plugins/org.eclipse.equinox.launcher_1.2.0.v20101119.jar -os macosx -ws cocoa -arch x86_64
>> 
>> results in the following message and an abrupt failure:
>> 
>> ***WARNING: Display must be created on main thread due to Cocoa restrictions.
>> 
>> Adding the -XstartOnFirstThread argument has no effect.
>> 
>> -- 
>> Erik
>> 
>> 
>> On Jan 14, 2011, at 5:43 PM, Michael Hall wrote:
>> 
>>> 
>>> On Jan 14, 2011, at 4:23 PM, Michael Hall wrote:
>>> 
>>>> Now to see if it compiles java for me without the SWT load errors.
>>> 
>>> HelloWorld! 1.7.0-internal
>>> 
>>> Yeah, that works. Never mind the script stuff Erik.
>>> 
>>> But Eclipse should have some sort of change for the dialog to properly handle the .jdk file. 
> 



More information about the macosx-port-dev mailing list