Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

errors got when downgrading from jdk 1.7 to jdk 1.6 [SOLVED]

 
wong sammy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

For some reasons, I need to downgrade jdk from 1.7u45 back to 1.6u45.
When I opened the java files, it reports many errors.
What is the proper step to remove the errors?
(I set back the compiler compliance level back to 1.6. No success.)


Please help
Thanks in advance
 
wong sammy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more step:
Project > properties
select "Java Build path"
On page tab "Libraries"
highlight "JRE System Library [JavaSE-1.7] (unbound)"

press button "Edit" and select "JavaSE-1.6 (jre6)"

Press button "finish" and then "OK"

 
Martin Vajsar
Sheriff
Pie
Posts: 3751
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the errors you get?

If you used new Java 7 features in your project (such as try-with-resources or a String switch), you'll need to modify the code to not use them. If this would mean a lot of changes, you might try to look for an automated solution for this, but if there just a few dozens of instances, it will probably be faster to go after them by hand.
 
wong sammy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martin,

Thanks.
The program just use java basic features.
After doing above settings, I get no errors.
 
Martin Vajsar
Sheriff
Pie
Posts: 3751
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I didn't understood your second post is the solution. Thanks for sharing it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic