- This topic has 6 replies, 2 voices, and was last updated 16 years, 4 months ago by Loyal Water.
-
AuthorPosts
-
jaMemberHi
I have installed ME Version: 6.0.1 GA .I have configured JBOSS 4.0 server to my web project..My project needs to get the system environment variable which is a folder path so i am using System.getProperty(“JBOSS_HOME”). When i start the server from cmd using run command, i m able to get the value for the variable.But when i try to start the server from ME, it gives me a null value..
Please some body give help
Thanks in advance
Loyal WaterMemberFirstly, you have to configure the connector to look like this:-
https://www.genuitec.com/forums/topic/jboss-4-what-does-a-configured-connector-look-like/Now after setting up the connector, create a new launch config and enter the environment variable under the Environment tab. This doc will give you more information on how to create the Custom Launch Config:-
http://www.myeclipseide.com/documentation/quickstarts/appservers/#createcustom
jaMemberHi
I had already done that.When i create a environment variable as JBOSS_HOME, in Arguments tab, under VM arguments there was a value -Djboss.home=D:/JbossMCD . so i tried including the following code
String JBOSS_HOME = System.getProperty(“JBOSS_HOME”);
logger.info(“JBOSS_HOME:”+JBOSS_HOME);
logger.info(” jboss.home:”+System.getProperty(“jboss.home”));if(JBOSS_HOME==null)
JBOSS_HOME = System.getProperty(“jboss.home”);
Then it worked correctly.
Can u explain the reason for that??? why doesn it accept JBOSS_HOME and thne convert it to jboss.home????
Thanks in advance
Loyal WaterMemberI just check with my dev team and it seems like there is an earier way of doing what I have suggested you to do. instead of using the custom launch config you can edit the connector preferences, under JDK and VM Arguments, set:
-DJBOSS_HOME=D:/JbossMCD-D sets system properties, which is what your trying to use.
jaMemberHi Nipun
Thanks for the reply. But the problem is even if i set the VM argument value as -DJBOSS_HOME=D:/JbossMCD, after i close the window and open it again, it will be reconstructed as -Djboss.home=D:/JbossMCD . So when i check for System.getProperty(“JBOSS_HOME”); eclipse is not able to search for JBOSS_HOME while System.getProperty(“jboss.home”) is giving the answer.Can you please tell me if this can be corrected…
Thanks
jaMemberHi Nipun
Sorry i had not tried adding the value under JDK VM argument. When i tried that its working fine. Thanks a lot.
Loyal WaterMemberYour welcome.
-
AuthorPosts