DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Problem with JRE compatibility using Eclipse
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2008
Default Problem with JRE compatibility using Eclipse - 12-03-2008, 12:25 AM

Hi,

I wrote code using Eclipse IDE . My system has Java 1.6 installed but the required code needed to run on JRE 1.5 machines also so I set the compliance level to JDK 1.5 in the Eclipse IDE. My knowledge was that even if my machine has JDK 1.6 installed,if I set the compliance level to JDK 1.5 in the Eclipse,my code will comply with the Java 1.5 APIs and run fine on JRE 1.6 as well as JRE 1.6. But after development,my tool went to customer sites and I have come to know that it is not running on machines with JRE 1.5. Can anybody tell me what went wrong?Please correct me if my knowledge was wrong.Have I followed wrong procedure?Please explain in detail as I am new to java.
Reply With Quote
  (#2 (permalink)) Old
Moderator
 
jwenting's Avatar
 
Posts: 99
Thanks: 0
Thanked 8 Times in 8 Posts
Join Date: Feb 2008
Send a message via MSN to jwenting
Default 12-03-2008, 05:56 AM

compiler compliance level doesn't mean it will generate classfiles that will work on that version of the JRE.
You may need to set another option ("generated class file compatibility) to get that.

Better yet, compile using a Sun 1.5 JDK rather than relying on the Eclipse compiler which has several known compatibility problems with Sun JREs which, though rare, can come back to bite you in some cases.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse RCP Preference Page problem adiherzog Eclipse 0 12-03-2008 05:39 AM
problem starting new project with Eclipse prfalco PHP 0 09-25-2008 04:44 PM
eclipse CDT import problem. ruony Eclipse 0 07-04-2008 01:29 AM
Ant-editors problem in eclipse 3.3.1.1 Ashkan Eclipse 2 04-03-2008 10:26 AM
Eclipse Help Display problem on MS Vista fg82183 Eclipse 2 02-08-2008 05:31 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com