aspose file tools
The moose likes Java in General and the fly likes java 5  and java 6 compatability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java 5  and java 6 compatability" Watch "java 5  and java 6 compatability" New topic

java 5 and java 6 compatability

Kowshik Nandagudi
Ranch Hand

Joined: Dec 09, 2010
Posts: 57
Hi All,

My production server has jre5 but the application in my local runs in jre6 . can i run that application in my production server which is java5

Best Regards,
Kowshik NS
Rob Spoor

Joined: Oct 27, 2005
Posts: 19847

Only if you
a) do not use any class, method or field that was introduced in Java 6; these will have a "Since Java 1.6" inside the Javadoc pages.
b) use the -target 1.5 compiler flag to get binary compatibility. If you forget this you will get an error when running your code.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: java 5 and java 6 compatability