Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Jeffery Yuan is currently offline Jeffery YuanFriend
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 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
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 Go to previous messageGo to next message
Jeffery Yuan is currently offline Jeffery YuanFriend
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 #546724 is a reply to message #546538] Tue, 13 July 2010 23:05 Go to previous messageGo to next message
Jeffery Yuan is currently offline Jeffery YuanFriend
Messages: 27
Registered: July 2009
Junior Member
I find the cause of the problem - though I still don't quite understand it why.

The problem is because I set eclipse default jdk to JDK1.4, and accordingly in Compiler tab, set compiler level to 1.4.
With this setting, rcp application can not be started, and report 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.

After I change default JDK to JDK1.5, it works, rcp application can be started.

The exported rcp product can also be run with JDK1.4.

Don't know why can't run rcp application when set eclipse default JDK to 1.4.
Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546762 is a reply to message #546724] Wed, 14 July 2010 06:52 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
yuanyun.ken wrote:
> I find the cause of the problem - though I still don't quite
> understand it why.
>
> The problem is because I set eclipse default jdk to JDK1.4, and
> accordingly in Compiler tab, set compiler level to 1.4.
> With this setting, rcp application can not be started, and report 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.
>
> After I change default JDK to JDK1.5, it works, rcp application can be
> started.
>
> The exported rcp product can also be run with JDK1.4.
>
> Don't know why can't run rcp application when set eclipse default JDK
> to 1.4.
I don't think that's the real cause. Something else seems to be wrongly
setup on your machine.

Dani
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 Go to previous messageGo to next message
Jeffery Yuan is currently offline Jeffery YuanFriend
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 #546884 is a reply to message #546805] Wed, 14 July 2010 13:19 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

yuanyun.ken wrote:
> 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.

I can't reproduce this problem. I extracted Helios (Eclipse SDK 3.6)
and ran eclipse with -vm /path/to/jdk1.4.2/bin/java and a clean
workspace. My only JRE then is the 1.4 JRE.

I create a plugin, and then "Launch an eclipse App". I get a some logs,
but the entire self-hosted eclipse launches.

I also created another plugin with the RCP Mail app. I launch it and it
comes up. My Preferences>Java>Compiler compliance level is set to 1.4.

This is all done with java 1.4.2.

PW



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Eclipse rcp 3.6 doesn't support Jdk1.4.2? [message #546910 is a reply to message #546884] Wed, 14 July 2010 15:01 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
This message:
<title>Incompatible JVM</title>Version 1.4.2 of the JVM is not suitable for
this product. Version: 1.5 or greater is required.

is reported by the launcher if it has been set up to enforce a specific java
version. This is controlled by the system property
"osgi.requiredJavaVersion".

If you are getting this message, then somewhere you have the property set as
"osgi.requiredJavaVersion=1.5". Check your config.ini file.

-Andrew


Paul Webster wrote:

> yuanyun.ken wrote:
>> 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.
>
> I can't reproduce this problem. I extracted Helios (Eclipse SDK 3.6)
> and ran eclipse with -vm /path/to/jdk1.4.2/bin/java and a clean
> workspace. My only JRE then is the 1.4 JRE.
>
> I create a plugin, and then "Launch an eclipse App". I get a some logs,
> but the entire self-hosted eclipse launches.
>
> I also created another plugin with the RCP Mail app. I launch it and it
> comes up. My Preferences>Java>Compiler compliance level is set to 1.4.
>
> This is all done with java 1.4.2.
>
> PW
>
>
>
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 Go to previous message
Jeffery Yuan is currently offline Jeffery YuanFriend
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?
Previous Topic:Configure a p2 update repository programmatically
Next Topic:Path in ImageLoader.load() method
Goto Forum:
  


Current Time: Wed Apr 24 21:00:41 GMT 2024

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

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

Back to the top