Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse rcp 3.6 doesn't support Jdk1.4.2?
Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546538] |
Tue, 13 July 2010 10:10 |
Jeffery Yuan Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi, all:
I first used eclipse 3.5 to develop our RCP project, when Eclipse 3.6 - helios is released, I switched to use eclipse 3.6.
But today I found out that, eclipse rcp 3.6 doesn't support Jdk1.4.2.
I have verified this, by creating a hello world rcp, and set Execution Environments to Jdk1.4. when creating project, it doesn't report error.
But when I tried to start the application, it reports error:
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for this product. Version: 1.5 or greater is required.
As our application must support JDK1.4,
Anybody can confirm me that whether application developed by eclipse rcp 3.6 supports JDK1.4 or not?
Or anyway to let eclipse rcp 3.6 support JDK1.4?
As our application must support JDK1.4,, do I have to switch back to use eclipse rcp 3.5?
Many thanks for any help or suggestion : )
|
|
|
Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546552 is a reply to message #546538] |
Tue, 13 July 2010 10:47 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
yuanyun.ken wrote:
> Hi, all:
> I first used eclipse 3.5 to develop our RCP project, when Eclipse
> 3.6 - helios is released, I switched to use eclipse 3.6.
> But today I found out that, eclipse rcp 3.6 doesn't support Jdk1.4.2.
That's a wrong finding: it should run on 1.4 as long as you don't add
additional bundles that require an higher BREE.
> I have verified this, by creating a hello world rcp, and set
> Execution Environments to Jdk1.4. when creating project, it doesn't
> report error.
Start with -debug and it should report you which bundles don't load.
Dani
> But when I tried to start the application, it reports error:
> <title>Incompatible JVM</title>Version 1.4.2 of the JVM is not
> suitable for this product. Version: 1.5 or greater is required.
> As our application must support JDK1.4, Anybody can
> confirm me that whether application developed by eclipse rcp 3.6
> supports JDK1.4 or not?
> Or anyway to let eclipse rcp 3.6 support JDK1.4? As our
> application must support JDK1.4,, do I have to switch back to use
> eclipse rcp 3.5?
> Many thanks for any help or suggestion : )
|
|
|
Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546584 is a reply to message #546552] |
Tue, 13 July 2010 13:37 |
Jeffery Yuan Messages: 27 Registered: July 2009 |
Junior Member |
|
|
hi, Dani:
As you suggested, I add -debug yo the application arguments.
The output is as following:
Configuration location:
file:...
Configuration file:
file:/.../config.ini loaded
Install location:
file:/D:/helios-rcp/
Framework located:
file:/D:/helios-rcp/plugins/org.eclipse.osgi_3.6.0.v20100517 .jar
Framework classpath:
file:/D:/helios-rcp/plugins/org.eclipse.osgi_3.6.0.v20100517 .jar
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for this product. Version: 1.5 or greater is required.
So I guess the problem lies in org.eclipse.osgi_3.6.0.v20100517.jar.
unzipped it, and in its META-INF\MANIFEST.MF, I found this:
Bundle-RequiredExecutionEnvironment: J2SE-1.5,OSGi/Minimum-1.2
Is this the reason why the application can not be started with JDK1.4?
But I modify eclipse config.ini to use JDK1.4,
-vm
$JDK-1.4Home/bin/java.exe
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.4
It does work, eclipse can run with JDK1.4.
So things looks weird, don't know whether eclipse rcp support JDK1.4 or not, or and change I should make to support JDK1.4?
|
|
| | |
Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546805 is a reply to message #546762] |
Wed, 14 July 2010 09:32 |
Jeffery Yuan Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi, Dani:
I reextracted helios-rcp.zip, so the eclipse is clean. and set eclipse workspace to a new directory, so the workspace is clean.
Then I set eclipse default JDK to 1.4 and accordingly set compiler level to 1.4.
Then I use the template hello rcp to create a rcp application.
The I tried to run the rcp application with -debug argument, it failed and reported error:
Configuration location:
file:/$WORKSPACE_HOME/.metadata/.plugins/org.eclipse.pde.cor e/rcp.jdk14.application/
Configuration file:
file:/$WORKSPACE_HOME/.metadata/.plugins/org.eclipse.pde.cor e/rcp.jdk14.application/config.ini loaded
Install location:
file:/D:/temp/helios-rcp/eclipse/
Framework located:
file:/D:/temp/helios-rcp/eclipse/plugins/org.eclipse.osgi_3. 6.0.v20100517.jar
Framework classpath:
file:/D:/temp/helios-rcp/eclipse/plugins/org.eclipse.osgi_3. 6.0.v20100517.jar
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for this product. Version: 1.5 or greater is required.
After I switched the default JDK to 1.5, it immediately works, and when switch back to JDK1.4, it fails.
I have tested with Sun and JDK 1.4, set them as default jdk, all fails.
And I have also run same tests on my colleague laptop, same results, rcp application can not be started when default JDK is 1.4.
This is not a big issue, as I can still use JDK1.4 to develop and run rcp application, just can not set default JDK to 1.4 at same time.
|
|
| | |
Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #547131 is a reply to message #546538] |
Thu, 15 July 2010 16:11 |
Jeffery Yuan Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi, Andrew, Paul, Dani:
Thanks all for your reply and help on this post : )
Sorry for not describing the steps to recreate the problem detailedly in previous post.
I didn't change eclipse configuration file - eclipse.ini, so it remains as :-Dosgi.requiredJavaVersion=1.5.
I just use eclipse Preferences to set default JDK and compiler level to 1.4.
To launch my rcp application, I didn't create a product configuration, just run it through the link in plugin.xml.
I think I have some clues about the problem.
In helios-rcp eclipse.ini: -Dosgi.requiredJavaVersion=1.5
If I change it to -Dosgi.requiredJavaVersion=1.4, then restart eclipse and rerun the test - use eclipse Preferences to set default JDK to 1.4.
The rcp application can be started successfully.
So I guess, the problem is that when PDE runs rcp application, it would automatically generate a config.ini or eclipse.ini, and will set the argument -Dosgi.requiredJavaVersion.
It doesn't set the value according to the JDK used by the project, but the value assigned in eclipse eclipse.ini file.
So I run some tests to verify my guess.
1. Set -Dosgi.requiredJavaVersion=1.5 and -Xms128m(only change this, others are untouched) in helios-rcp eclipse.ini, start eclipse with a new clean workspace, set the default JDK to 1.4 using Preferences page.
Create a hello rcp application, set Execution Environment to J2SE-1.4.
Try to start it, and failed with error:
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for this product. Version: 1.5 or greater is required.
Then right click my rcp project, and new a product file, choose "Use a launch configuration", and select my rcp application in the combo box.
Open the created product file, and find this:
<vmArgs>-Dosgi.requiredJavaVersion=1.5 -Xms128m -Xmx512m</vmArgs>
===> -Xms128m, this is also changed according to helios-rcp eclipse.ini.
2. Set -Dosgi.requiredJavaVersion=1.4 and -Xms80m in helios-rcp eclipse.ini, start eclipse with a new clean workspace, set the default JDK to 1.4 using Preferences page.
Create a hello rcp application, set Execution Environment to J2SE-1.4.
Try to start it, and succeed.
Then right click my rcp project, and new a product file, choose "Use a launch configuration", and select my rcp application in the combo box.
Open the created product file, and find this:
<vmArgs>-Dosgi.requiredJavaVersion=1.4 -Xms80m -Xmx512m</vmArgs>
===> -Xms80m, this is also changed according to helios-rcp eclipse.ini.
I think the value -Dosgi.requiredJavaVersion should be set based on the Execution Environment user set, not based on the eclipse.ini of the eclipse IDE.
I don't know whether my guess is correct, maybe someone familiar with PDE code can correct me : )
Another problem - maybe not: )-I have set JDK1.4, and JDK1.5 in eclipse, and set default JDK to 1.4, create a rcp application, set Execution Environment to J2SE-1.5.
I also configure Execution Environment J2SE-1.5 to the installed JDK 1.5 in Preferences > Execution Environment tab.
Then start the application, it failed with same error:
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for this product. Version: 1.5 or greater is required.
I think this may be because PDE starts rcp application with default JDK1.4, not uses the configured J2SE-1.5 Execution Environment.
PDE can't start rcp application with the user selected JDK, but can only run rcp application with the default JDK?
|
|
|
Goto Forum:
Current Time: Tue Sep 24 17:23:45 GMT 2024
Powered by FUDForum. Page generated in 0.05802 seconds
|