2

I wish to open certain java applications (For example, MapTools, part of RPtools) with Oracle Java 6 for compatibility purposes using shell scripts.

In the simplest possible terms, what do I need to do to make a working shell script for an application to launch with a specific java version on Ubuntu?

Note that for maximum usefulness, specific application names should not be used. Instead use tags such as "App" to determine where the name of the application or it's path should go.

user1524705
  • 63
  • 1
  • 5

2 Answers2

2

Specify absolute path of java executable of the JRE version,

[JRE_HOME]/bin/java -jar jar_name.jar

e.g.

/usr/lib/jvm/oracle-7-jre/bin/java -jar exec.jar
Prakash Bhagat
  • 1,406
  • 16
  • 30
0

Use the full path to the desired java.exe in your command line.

See Run a JAR file using a specific JRE.

Community
  • 1
  • 1
gknicker
  • 5,509
  • 2
  • 25
  • 41