• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[SOLVED] Netbeans, how to set my project to work with Java 5

 
Ranch Hand
Posts: 86
1
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys, I want to set my project (Netbeans) to create my class files compatible with Java 5. My computer has JDK 7 installed, do I need to install Java 5 SDK in order to resolve this question or I can tell the compiler to generate Java 5 code ?

I just found it in Properties->Sources->Source Binary Format
Thanks
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you found it. Thanks for updating your post with the answer for someone else who wants to know this in the future. I've given you a cow for that.
 
Ranch Hand
Posts: 124
4
MySQL Database Clojure Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am glad you solved your problem but I want to mention something that just happened to me. I just inherited a broken program created with Java 5 in Net Beans about a decade ago. I am trying to revive it, do some analysis and possibly refactoring to bring it up to date, if needed. I imported the files (the entire project) into Net Beans and I kept getting errors telling me that I was missing several jar files and that certain packages were missing, even though these things were present in the project. I spent several days scratching my head, trying all sorts of things, and doing some research. I had come across some info regarding this behavior basically stating that there was a bug in Net Beans that can cause this problem.

Anyway, to make a long story short, I installed Eclipse created an an empty project in Eclipse and then imported the Net Beans project into Eclipse. Guess what? There were no errors, all the jar files and packages that net Beans could not find were present, and I had an old program that had some functionality. I guess I am just trying to say that if you have issues with java 5 code, and you look at the code and know that everything is in place, it might be the Net Beans IDE.
 
Bartender
Posts: 1357
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Blake,
When I had to face a situation very close to that you described, I prefer to create a new project in Netbeans and copy and paste old source code. This way I used to get rid of strange issues like the ones you wrote about. Netbeans is definitely a very good IDE in my opinion, but sometimes gives some headache.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic