網頁

2019/9/23

JBoss EAP Standalone Server jdk版本設定

JBoss EAP Standalone Server運行時預設會使用系統環境變數JAVA_HOME所指路徑的jdk,若要改用其他的jdk版本則修改方式如下。


範例環境:

  • JBoss EAP 6.4
  • Windows 64 Bit

在JBoss EAP的安裝目錄下的bin資料夾(例如)中找到standalone.conf.bat,此為JBoss EAP啟動時會讀取的設定檔。



用文字編輯器開啟standalone.conf.bat找到下行註解。
rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java"
把該行改成 set "JAVA=<JAVA_HOME>"<JAVA_HOME>為指定的jdk目錄位置。

例如我想指定的jdk路徑為 D:\Applications\Java\jdk.1.8.0_171,就改為
set "JAVA=D:\Applications\Java\jdk.1.8.0_171"


然後開啟Windows cmd命令行工具,執行JBoss EAP的安裝目錄bin資料夾中的standalone.bat即可啟動JBoss EAP Standalone Server,在啟動訊息中即可確認所使用的JAVA資訊。

D:\Applications\JBoss\jboss-eap-6.4\bin>standalone.bat
Calling "D:\Applications\JBoss\jboss-eap-6.4\bin\standalone.conf.bat"
Setting JAVA property to "D:\Applications\Java\jdk.1.8.0_171\\bin\java"
===============================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: "D:\Applications\JBoss\jboss-eap-6.4"

  JAVA: "D:\Applications\Java\jdk.1.8.0_171\\bin\java"

  JAVA_OPTS: "-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:N
umberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -XX:+UseCompressedOops -Dprogram.n
ame=standalone.bat -Xms1G -Xmx1G -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true  -Djboss.modul
es.policy-permissions=true  -Djboss.modules.system.pkgs=org.jboss.byteman"

===============================================================================

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in
8.0
22:10:31,640 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
22:10:31,832 INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.5.Final-redhat-1
22:10:31,919 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.4.0.GA (AS 7.5.0.
Final-redhat-21) starting
22:10:33,476 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http manageme
nt service using socket-binding (management-http)
22:10:33,477 INFO  [org.xnio] (MSC service thread 1-1) XNIO Version 3.0.13.GA-redhat-1
22:10:33,490 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.0.13.GA
-redhat-1
22:10:33,617 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier
property is set to the default value. Please make sure it is unique.
22:10:33,655 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.3.4.Final-
redhat-1
22:10:33,697 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280
: Activating Infinispan subsystem.
22:10:33,706 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Activating Na
ming Subsystem
22:10:33,748 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 37) JBAS012615: Activated the fo
llowing JSF Implementations: [main, 1.2]
22:10:33,751 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activati
ng WebServices Extension
22:10:33,783 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Starting JC
A Subsystem (IronJacamar 1.0.31.Final-redhat-1)
22:10:33,804 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013371: Activating
Security Subsystem
22:10:33,855 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27)
 JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
22:10:34,191 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013370: Current PicketBox ve
rsion=4.1.1.Final-redhat-1
22:10:34,466 INFO  [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Servic
e
22:10:34,470 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail ses
sion [java:jboss/mail/Default]
22:10:34,647 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Sta
rted FileSystemDeploymentService for directory D:\Applications\JBoss\jboss-eap-6.4\standalone\deploy
ments
22:10:34,690 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JB
oss Web Services - Stack CXF Server 4.3.4.Final-redhat-1
22:10:34,771 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on 127.0.0
.1:4447
22:10:34,776 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on 127.0.0
.1:9999
22:10:34,775 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003001: C
oyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
22:10:34,803 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003000: C
oyote HTTP/1.1 starting on: http-/127.0.0.1:8080
22:10:34,965 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS0104
00: Bound data source [java:jboss/datasources/ExampleDS]
22:10:35,139 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface lis
tening on http://127.0.0.1:9990/management
22:10:35,141 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on ht
tp://127.0.0.1:9990
22:10:35,142 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.
Final-redhat-21) started in 3848ms - Started 153 of 191 services (57 services are lazy, passive or o
n-demand)

若要停止啟動的JBoss EAP,直接按Ctrl + C,然後輸入Y確認即可。

22:31:24,005 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS0104
09: Unbound data source [java:jboss/datasources/ExampleDS]
22:31:24,008 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) JBWEB003075: C
oyote HTTP/1.1 pausing on: http-/127.0.0.1:8080
22:31:24,012 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) JBWEB003077: C
oyote HTTP/1.1 stopping on : http-/127.0.0.1:8080
22:31:24,006 INFO  [org.apache.catalina.core] (MSC service thread 1-6) JBWEB001079: Container org.ap
ache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been started
22:31:24,027 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015950: JBoss EAP 6.4.0.GA (AS 7.5.0.
Final-redhat-21) stopped in 52ms
Terminate batch job (Y/N)?

參考:

沒有留言:

張貼留言