Reputation: 265
My application will support only java 1.6 version and I need to execute all test cases using java 1.7 compiled class files code.
My question how to reach above requirement...
Application will not open with Java 1.7, but I need to use java 1.7 compiled files only.
Upvotes: 0
Views: 2142
Reputation: 533530
Like any program, you need to specify the directory of the program you want to run, either directly by giving the full path name, or indirectly by setting an environment variable like PATH or JAVA_HOME OR JDK_HOME
You can install any number of updates/versions of Java until you run out of disk space. To configure each program to use a specific version you need to look at how they are started and set appropriate directory to use Java from for that program.
Upvotes: 0
Reputation: 4864
Yes it is possible.
You can install multiple java versions in single system.
To make it simple. You can use eclipse , or Netbeans IDE. In that you can use different java versions to compile.
Upvotes: 0
Reputation: 1200
Yes , it is possible. You need to change JAVA_HOME
environmental variable. You can set it in the script that is used to start the application.
This article might help you
Upvotes: 2