Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize that one machine runs two JDK

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "how to achieve a machine to run two JDK", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to achieve a machine to run two JDK" this article.

One machine runs two JDK

Because of the system, now we have to run two JBOSS on a server, one is to run JDK1.4, the other is to run JDK1.5. Running two JBOSS on one machine has been done, and the rest is the question of how to run two JDK. I have been looking for N on the Internet for a long time, but I can't find a solution. Suddenly saw the run.bat file in JBOSS, carefully studied the contents, and found the following fields: if not "% JAVA_HOME%" = "" goto ADD_TOOLS. I don't understand the syntax of the script, but I can guess the meaning of the statement: if JAVA_HOME== "", skip to ADD_TOOLS. Then look for ADD_TOOLS and find

: ADD_TOOLS

Set JAVA=%JAVA_HOME%binjava. The original JDK version of JBOSS is set here, it looks for JAVA_HOME from the environment variables, so we can force JAVA_HOME here.

So add the following statement to the if not "% JAVA_HOME%" = "" goto ADD_TOOLS:

Set JAVA_HOME=C:j2sdk1.4.2_06.

Echo JAVA:% JAVA_HOME%

Start JBOSS. Find that the console prints out "JAVA: C:j2sdk1.4.2_06". Haha, the JDK running version of JBOSS is set up successfully, and a big problem has finally been solved.

The above is all the contents of the article "how to run two JDK on one machine". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report