Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 104960 - Compliance level error when building plugin
Summary: Compliance level error when building plugin
Status: RESOLVED DUPLICATE of bug 115637
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-24 21:14 EDT by Fabio Zadrozny CLA
Modified: 2005-11-26 13:01 EST (History)
0 users

See Also:


Attachments
The compiler preferences I'm using (25.52 KB, image/png)
2005-07-24 21:17 EDT, Fabio Zadrozny CLA
no flags Details
The logs from the site build (1.99 KB, application/octet-stream)
2005-07-25 07:32 EDT, Fabio Zadrozny CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Zadrozny CLA 2005-07-24 21:14:22 EDT
I'm adding some java 1.5 features into a plugin (pydev), and I can run it and
debug it inside eclipse without any problems, however, I just cannot make an
update site or export the feature. 

I've set the compiler to 5.0 compliance, however, when exporting it as a
feature, or update site, it always gives me the same error: 

Compliance level '1.4' is incompatible with source level '1.5'. A compliance
level '1.5' or better is required.

I've tried setting the compliance to 5.0 for each project and the error persisted. 

In the plug-in development, the target platform is java 1.5. The only installed
jdk is 1.5 (altough initially I had 1.4 installed).

My eclipse.ini has the following contents:
-vm "C:\Program Files\Java\jdk1.5.0_04\bin\javaw.exe"
-vmargs
-Xms40m
-Xmx256m

I'm using the sun java 1.5_04 jdk (and the jre from the jdk).
Comment 1 Fabio Zadrozny CLA 2005-07-24 21:17:33 EDT
Created attachment 25220 [details]
The compiler preferences I'm using
Comment 2 Fabio Zadrozny CLA 2005-07-25 07:32:24 EDT
Created attachment 25231 [details]
The logs from the site build

No '.class' files are generated (only this log).
Comment 3 Sonia Dimitrov CLA 2005-07-25 09:34:58 EDT
I think this is one for PDE UI.  Moving, please re-assign as appropriate.
Comment 4 Fabio Zadrozny CLA 2005-07-26 10:27:51 EDT
Hi, I've finally been able to make it work. I had an old install of java 1.4,
and apparently, the build was not using my workspace nor project settings, but
this old version (don't know why, as I removed all traces from within eclipse)
was not letting it work, anyway, after removing all 1.4 related installation
from my system and installing the 1.5 jre (not only the jdk), it works.

So, it appears that the build tools use some configurations from outside of the
Eclipse 'sandbox', I just could not figure which...

Fabio
Comment 5 Konrad Kolosowski CLA 2005-07-26 10:50:27 EDT
Marking as resolved, then.  I am not sure what the problem was, but was unable 
to reproduce.
Comment 6 Loo Guan Wee CLA 2005-08-14 07:17:44 EDT
Hi,
I faced the same problem while exporting my RCP plug-in. However I did not 
have to remove the previous version of the JDK. I Just changed the PATH 
(JAVA_HOME as well) to point to JDK 1.5 and restarted Eclipse. This solved the 
problem but I guess this is just a stop-gap solution.
Comment 7 Patrick Schriner CLA 2005-11-26 04:53:28 EST
(In reply to comment #5)
> Marking as resolved, then.  I am not sure what the problem was, but was unable 
> to reproduce.

Reading the comments I cannot see that this bug is resolved. PDE shoud respect the Compiler Compliance setting, and not work with the default system JRE (as is suggested by the comments).

I guess a way to reproduce would be:

- install jdk 1.5
- install jdk 1.4 (now the default JRE is the 1.4 JRE)
- Create plugin that uses Java 5 features (e.g. printf).
- export feature
Comment 8 Wassim Melhem CLA 2005-11-26 13:01:04 EST
reopening to mark as dup
Comment 9 Wassim Melhem CLA 2005-11-26 13:01:29 EST

*** This bug has been marked as a duplicate of 115637 ***