Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » (no subject)
(no subject) [message #671135] Mon, 16 May 2011 20:43 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5340
Registered: July 2009
Senior Member
Hi,
(I found the answer to this post while I was writing the post, but I will still post it for someone else...)

I am on Ubuntu 11.04 on a 64 Bit machine, I have the 64 bit versions of the jdk and of eclipse 3.6 and 3.7. Eclipse
itself runs fine. But all environments give me the same trouble:
- the org.eclipse.swt.SWT imports in java code can not be resolved
- when I run junit plugins tests I get:
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

and looking at the console I see the info below (check the ARCH and the -arch values), the arch values seem to be wrong,
they are x86, while they should be x86_64 (I think). How are the arch values determined? And is this value somehow used
by jdt/pde, so that it can't resolve swt in java?

The run config:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog

The output in the console:
!SESSION 2011-05-16 22:27:03.642 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -version 3 -port 49847 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
-loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.eclipse.emf.texo.orm.test.ORMGeneratorTest -application
org.eclipse.pde.junit.runtime.coretestapplication -testpluginname org.eclipse.emf.texo.orm.test
Command-line arguments: -os linux -ws gtk -arch x86 -consoleLog -version 3 -port 49847 -testLoaderClass
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames
org.eclipse.emf.texo.orm.test.ORMGeneratorTest -application org.eclipse.pde.junit.runtime.coretestapplication -data
/home/mtaal/mydata/dev/workspaces/texo/../texo-gen-workspace -dev
file:/home/mtaal/mydata/dev/workspaces/texo/.metadata/.plugi ns/org.eclipse.pde.core/pde-junit/dev.properties -os linux
-ws gtk -arch x86 -consoleLog -testpluginname org.eclipse.emf.texo.orm.test

Eclipse itself runs fine and shows the correct arch:
/usr/bin/java -Dosgi.arch=X86_64 -Dosgi.ws=gtk -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar
/home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar -os linux -ws gtk
-arch x86_64 -showsplash -launcher /home/mtaal/myapps/eclipse/eclipse3.7M7/eclipse -name Eclipse --launcher.library
/home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher.gtk.linux.x86_64_1.1.100.v20110321/eclipse _1406.so
-startup /home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar
--launcher.overrideVmargs -exitdata 1f10027 -clean -product org.eclipse.epp.package.jee.product -vm /usr/bin/java
-vmargs -Dosgi.arch=X86_64 -Dosgi.ws=gtk -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar
/home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
(no subject) [message #671136 is a reply to message #671135] Mon, 16 May 2011 20:46 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5340
Registered: July 2009
Senior Member
Okay and then here is the answer, for the record:

I moved from a 32bit to a 64bit machine and copied over my workspaces from the 32 to the new 64bit machine. What I was
not aware of was that the target platform defined in windows/preferences pde has a 'hard' setting for the architecture.
It does not change dynamically. So to solve the below issues I changed the architecture in the target platform from x86
to x86_64 and voila it worked :-).

gr. Martin

On 05/16/2011 10:43 PM, Martin Taal wrote:
> Hi,
> (I found the answer to this post while I was writing the post, but I will still post it for someone else...)
>
> I am on Ubuntu 11.04 on a 64 Bit machine, I have the 64 bit versions of the jdk and of eclipse 3.6 and 3.7. Eclipse
> itself runs fine. But all environments give me the same trouble:
> - the org.eclipse.swt.SWT imports in java code can not be resolved
> - when I run junit plugins tests I get:
> Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>
> and looking at the console I see the info below (check the ARCH and the -arch values), the arch values seem to be wrong,
> they are x86, while they should be x86_64 (I think). How are the arch values determined? And is this value somehow used
> by jdt/pde, so that it can't resolve swt in java?
>
> The run config:
> -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog
>
> The output in the console:
> !SESSION 2011-05-16 22:27:03.642 -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_25
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
> Framework arguments: -version 3 -port 49847 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
> -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.eclipse.emf.texo.orm.test.ORMGeneratorTest -application
> org.eclipse.pde.junit.runtime.coretestapplication -testpluginname org.eclipse.emf.texo.orm.test
> Command-line arguments: -os linux -ws gtk -arch x86 -consoleLog -version 3 -port 49847 -testLoaderClass
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames
> org.eclipse.emf.texo.orm.test.ORMGeneratorTest -application org.eclipse.pde.junit.runtime.coretestapplication -data
> /home/mtaal/mydata/dev/workspaces/texo/../texo-gen-workspace -dev
> file:/home/mtaal/mydata/dev/workspaces/texo/.metadata/.plugi ns/org.eclipse.pde.core/pde-junit/dev.properties -os linux
> -ws gtk -arch x86 -consoleLog -testpluginname org.eclipse.emf.texo.orm.test
>
> Eclipse itself runs fine and shows the correct arch:
> /usr/bin/java -Dosgi.arch=X86_64 -Dosgi.ws=gtk -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar
> /home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar -os linux -ws gtk
> -arch x86_64 -showsplash -launcher /home/mtaal/myapps/eclipse/eclipse3.7M7/eclipse -name Eclipse --launcher.library
> /home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher.gtk.linux.x86_64_1.1.100.v20110321/eclipse _1406.so
> -startup /home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar
> --launcher.overrideVmargs -exitdata 1f10027 -clean -product org.eclipse.epp.package.jee.product -vm /usr/bin/java
> -vmargs -Dosgi.arch=X86_64 -Dosgi.ws=gtk -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar
> /home/mtaal/myapps/eclipse/eclipse3.7M7//plugins/org.eclipse .equinox.launcher_1.2.0.v20110321-2120.jar
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:exporting eclipsec instead of eclipse
Next Topic:Exposing packages from a jar inside a plug-in
Goto Forum:
  


Current Time: Fri Dec 19 04:11:30 GMT 2014

Powered by FUDForum. Page generated in 0.01797 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software