简体   繁体   English

如何将特定的JRE版本设置为在JBoss上运行的Java应用程序的默认版本

[英]How to set a particular JRE version as default for my Java application running on JBoss

I have a Java application which runs on JBoss 5.1.0 GA. 我有一个在JBoss 5.1.0 GA上运行的Java应用程序。 The problem I am facing is, every client machine has multiple JRE versions installed and due to several constraints, my application specifically needs JRE 1.6.33 to run smoothly. 我面临的问题是,每台客户端计算机都安装了多个JRE版本,并且由于多个约束,我的应用程序特别需要JRE 1.6.33才能平稳运行。 Is there a way to set default JRE version for my application in JBoss or any other settings elsewhere? 有没有办法在JBoss或其他地方的其他应用程序中为我的应用程序设置默认的JRE版本?

Many thanks. 非常感谢。

I'm pretty sure JBoss uses the JAVA_HOME env. 我很确定JBoss使用JAVA_HOME env。 variable so it has to point to JRE 1.6.33. 变量,因此它必须指向JRE 1.6.33。

If it's set to a different JRE you can change your starting script so it changes the JAVA_HOME to JRE1.6, starts jboss and after that it changes JAVA_HOME back to it's original value. 如果将其设置为其他JRE,则可以更改启动脚本,以便将JAVA_HOME更改为JRE1.6,启动jboss,然后将JAVA_HOME更改回其原始值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM