How to register Environment Variable in Linux ???

  • relic
  • Newbie
  • Newbie
  • relic
  • Posts: 14

Post 3+ Months Ago

I'm definately new in linux and i would like to create a JSP+Servlets/Jakarta.Tomcat web services with my lousy PC.
I'm just install the Jdk50 and realize that I don't know how to setup the environment variable for java. I read the building.txt from java.tar.gz and just simply asking me to

(1.3) Set an environment variable named JAVA_HOME to the pathname of
the directory into which you installed the JRE, e.g. c:\j2sdk5.0
or /usr/local/java/j2sdk5.0.


I can't find any solution. Can somebody tell me how to do it ?

thank you ~ :oops: :(
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Jerrek
  • Graduate
  • Graduate
  • User avatar
  • Posts: 158
  • Loc: Melbourne, AUS

Post 3+ Months Ago

In /etc/profile (if you're using bash, which you probably are) then you need to add the line;

export JAVA_HOME=/usr/local/java/j2sdk5.0

Assuming of course that's where your JDK is installed.

You'll need to logout and back in again before the change is noticed (although you can run that command directly from the command line with the same effect)

If it doesn't work you'll have to let me know which shell you're running :)
  • relic
  • Newbie
  • Newbie
  • relic
  • Posts: 14

Post 3+ Months Ago

Thank you u help me,
I would like to ask another thing,
Is it need to restart the server after register JAVA_HOME ???
then can you tell me wat is the command for me to remote restart the linux ? (actually I'm using remote access with putty.exe to configure and control the linux9.0)
  • Jerrek
  • Graduate
  • Graduate
  • User avatar
  • Posts: 158
  • Loc: Melbourne, AUS

Post 3+ Months Ago

You don't need to restart the server, no.

You just need to logout and log back in again and it should be set for you.
  • relic
  • Newbie
  • Newbie
  • relic
  • Posts: 14

Post 3+ Months Ago

Sorry to border u again ~

My Tomcat Server is currently online already ... but ... I can't surf it !!
http://192.168.0.111:8080 come out page not found and the console Catalina run normally... why ???? any problem ???? how to change the port number ?? These are the output after i run the server.


[root@host bin]# ./catalina.sh run
Using CATALINA_BASE: /home/kahwin/Desktop/jakarta-tomcat-5.5.9
Using CATALINA_HOME: /home/kahwin/Desktop/jakarta-tomcat-5.5.9
Using CATALINA_TMPDIR: /home/kahwin/Desktop/jakarta-tomcat-5.5.9/temp
Using JRE_HOME: /home/kahwin/Desktop/jdk1.5.0_03
Jun 16, 2005 1:36:55 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 16, 2005 1:36:55 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1600 ms
Jun 16, 2005 1:36:55 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 16, 2005 1:36:55 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
Jun 16, 2005 1:36:55 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 16, 2005 1:36:58 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 16, 2005 1:36:58 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 16, 2005 1:36:58 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
Jun 16, 2005 1:36:58 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 16, 2005 1:36:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3197 ms


I have restart the server so much time and get nothing ..... wuwuwu :(
  • Jerrek
  • Graduate
  • Graduate
  • User avatar
  • Posts: 158
  • Loc: Melbourne, AUS

Post 3+ Months Ago

Looks like Tomcat is starting correctly, but I don't see any web application being loaded from that - you'll need to check that you've uploaded your WAR into the right place.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 25 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.