Home > Back-end >  System multiple tomcat version, in a jar package command can be specified when the tomcat version?
System multiple tomcat version, in a jar package command can be specified when the tomcat version?

Time:09-27

System multiple tomcat version, in a jar package command can be specified when the tomcat version?

Java - jar XXX. The jar - server. The port=8080

The above command can join the specified tomcat version? If you can, how? If not, how to solve the problem of choosing version

CodePudding user response:

/opt/jdk1_8/bin/Java - jar cas. Jar
/opt/jdk1_7/bin/Java - jar cas. The jar

CodePudding user response:

reference 1st floor dkwuxiang response:
/opt/jdk1_8/bin/Java - jar cas. Jar
/opt/jdk1_7/bin/Java - jar cas. Jar



What do you mean to execute Java - under the tomcat version of the installation directory of the jar command?

CodePudding user response:

Wrong, I thought is to specify JDK version
But running a jar to use tomcat?

To run in which tomcat put the jar in which tomcat is not ok?

CodePudding user response:

refer to the original poster qiujg response:
system multiple tomcat version, in a jar package command can be specified when the tomcat version?

Java - jar XXX. The jar - server. The port=8080

The above command can join the specified tomcat version? If you can, how? If not, how to solve the problem of choosing version

Don't understand your needs,
S understanding 1
You want to use the JRE in tomcat
If so, is very simple,
Write a bat
Invoked, passing different arguments 1, 2, 3,,,
1 the corresponding tomcat1 jre bin path
2 the corresponding tomcat2 jre bin path
,,,
Before execution, set the path environment variable, path=% tomcat1binpath %; % % path
Environment variables in the front would be preferred to use,
So, when using the Java command, you can use to the corresponding Java jre bin in the

S understand 2
What do you want to the inside of the jar program, the start tomcat?
When performing the jar, if so, give the main method for passing a arguments, logic judgment by parameters, in which one to use tomcat not line? Not such a simple question!
  • Related