I'm working on an application that has been created long time ago (maybe 2008/2009). Now I got the task of upgrading the server.
Previously it was compiled in jdk1.4. Now I have to make the application compatible with jdk1.7. I tried to compile it with jre7 and I've changed source and target value of ant build.xml file to 1.7
. And also in ANT build the jre7 is selected as compiler environment.
I'm getting the following error message:
[javac] javac: invalid target release: 1.7
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compiler is doing
[javac] -deprecation Output source locations where deprecated APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source files
[javac] -bootclasspath <path> Override location of bootstrap class files
[javac] -extdirs <dirs> Override location of installed extensions
[javac] -d <directory> Specify where to place generated class files
[javac] -encoding <encoding> Specify character encoding used by source files
[javac] -source <release> Provide source compatibility with specified release
[javac] -target <release> Generate class files for specific VM version
[javac] -help Print a synopsis of standard options
I tried to print the java version using following line:
and it shows :
[echo] Using Java version 1.7.
What (other) changes do I need to make to make it work with jdk1.7?