Magpie
Magpie

Reputation: 627

Am I going to have problems if I try to use classes I wrote using jdk7 on jdk6?

I do plan to check the API and make sure that I am only using jdk6 libraries but a couple of compatibility posts on here have made me a bit nervous.

I need to upload some files onto a jdk6 computer but I run eclipse with jdk7 on mine and I do not have time to check if the files will compile. I need them to be able to compile. Is there something I can do to avoid trouble?

Upvotes: 2

Views: 92

Answers (2)

aymeric
aymeric

Reputation: 3895

In eclipse, use the JDK compliance property. Right click on a project, Java Compiler -> Compiler compliance level -> 1.6

Upvotes: 1

user784540
user784540

Reputation:

Use -target key for java 1.7 compiler to make sure your code will run on jvm 6 flawlessly.

Upvotes: 2

Related Questions