• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Environment variable in linux

 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The environment variable where i store the xml files physical path then in the connections.java class i read the environment variable and pass it to the confighandler.java
Here is the code for the above.
String path=System.getenv("CONFIG_PATH").toString();//read the environment variable named CONFIG_PATH
filePath=new File(path).toURI().toString();
and pass it on to the ConfigHandler
ConfigHandler config=new ConfigHandler(filePath);
I have created the environment variable in windows where i store the physical path of the Config.xml file, I am able to read the path of the environment variable in windows but not in linux redhat 5 server
The prob is that i need to deploy it on the linux redhat 5 server.
on linux also i have declared the environment variable with the same name but it does not reads the file when i deploy the project as a war in tomcat 5.5 but when i tried to test it with a sample jsp it read the environment variable. can any one give any hint. i have given 777 rights for that war file so root can execute the war file.
any suggestions??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

This post has been moved to a more appropriate forum.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic