Setup JAVA_HOME n CATALINA_HOME environment variable

Hi there
im new in Java Servlet programming... im confused how to setup JAVA_HOME n CATALINA_HOME environment variable... if any1 of u know this plz help me to how to setup it... it will help me very much.
thanks in advance
112

Once you have identified the JDK install path:
1. Right click on the My Computer icon on your desktop and select properties
2. Click the Advanced Tab
3. Click the Environment Variables button
4. Click New
5. Enter the variable name as JAVA_HOME
6. Enter the variable value as the install path for the Java Development Kit.
7. OK
Next you have set an environment variable CATALINA_HOME that contains the pathname to the directory in which Tomcat 5 has been installed, the same way you set the JAVA_HOME ev.

Similar Messages

  • Why do we need to declare CATALINA_HOME environment variable in Tomacat?

    {color:#ff0000}*Why do we need to set CATALINA_HOME
    environment variable while using TomCat and what happens if we do not
    {color}
    {color:#008000}If anybody has the solution .. please do reply
    {color}
    Thanks &
    Regards, Akshay_L

    SoulTech2012 wrote:
    it makes zero sense because if CATALINA_HOME is not set, then CATALINA_HOME/bin won't resolve at all (unless some form of magic is used)
    # Get standard environment variables
    PRGDIR=`dirname "$PRG"`
    # Only set CATALINA_HOME if not already set
    [ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`rightBy "right", are you being sarcastic or are you saying that code is correct?
    It's a pretty standard technique for setting default variables under *nix, no magic involved. And this particular example was taken from the Tomcat 5.5.25 startup script.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error in setting environment variable

    hi
    Please note JKit is where my jdk1.3 is stored(i.e instead of jdk1.3 folder its JKit folder)... i have gone thru the similar threads but with no success.
    SET
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;D:\Jkit\bin;D:\Jkit\lib;D:\Oracle\bin;"C:\PROGRAMFILES\ORACLE\JRE\1.1.7\BIN";D:\JKit\Jre\Bin;
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
    SET CLASSPATH=c:\JavaWebServer2.0\lib\servlet.jar;c:\JKit\lib;
    SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29;
    SET JAVA_HOME=D:\Jkit;
    The error i get after running autoexec.bat and then tomcat/bin/startup is as follows..
    The CATALINA_HOME environment variable is not defined
    This environment variable is needed to run this program
    please HELP!!.THANKS

    Hi
    Very many thanks for ur solution.. i actually hadset the environment variables spacce..but when i execute the autoexec.bat file i dont get any error(out of env space)..but when i run the startup.bat file i get from the command prompt, i get the foll error.
    This is my Autoexec.bat
    SET JAVA_HOME=D:\Jkit\bin
    SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29\bin
    SET PATH=D:\Jkit\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
    THE FOLLOWING IS THE ERROR I GET WHEN I RUN STARTUP.BAT UNDER TOMCAT'S BIN UNDER THE COMMAND PROMPT
    D:\tomcat\jakarta-tomcat-4.1.29\bin>startup
    Syntax error
    Out of environment space
    Out of environment space
    Out of environment space
    Using CATALINA_BASE: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_HOME: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_TMPDIR: D:\tomcat\jakarta-tomcat-4.1.29\temp
    Using JAVA_HOME: D:\Jkit
    Out of environment space
    Out of environment space
    Invalid switch - -DJAVA.ENDORSED.DIRS=D:\TOMCAT\JAKARTA-TOMCAT-4.1.29\COMMON\ENDORSED
    I even set JAVA_HOME AND CATALINE_HOME to the \bin dir respectively..
    still i get the same error
    As given under the tomcat installation documentation (RUNNING.txt), i set the space for environment space under the Memory tab, for startup and shutdown.bat files, it creates a shortcut for running the resp .bat files, running startup.bat file i get,CATALINA_HOME VAR HAS NOT BEEN SET PROPERLY, THIS OCCURS FOR BOTH TOP LEVEL DIR SETTING AND /bin DIR SETTING of CATALINE_HOME IN autoexec.bat
    PLEASE HEL, I HAVE BEEN TRYING TO CONFIGURE IT FOR THE PAST DAYS BUT WITH NO SUCCESS, DONT KNOW WHERE I AM GOING WRONG..PLEASE HELP

  • Get environment variable from servelet

    hello
    in my servlet,there is following code block:
    File f=new File("%JAVA_HOME%\\test.txt");
    f.createNewFile();
    the "JAVA_HOME" is the environment variable of my windows.after i deploy it to jboss,it threw exception.that tell me can't find the path.
    then i modify it as:
    File f=new File("%JBOSS_HOME%\\test.txt");
    f.createNewFile();
    the "JBOSS_HOME" is definde in its "run.bat " file.
    the code still don't work.
    who can tell me :
    1 how can i use the environment variable of os or app server?
    2 how and where can i set up a envrionment variable as the base dir ?
    thank you.

    This is a bad idea.
    You shouldn't use absolute file paths or the java.io.File class for that matter in Web apps.
    Better to look in the servlet context using getResourceAsStream(). That'll return an InputStream that you'll be able to read to your heart's content.

  • Unable to start java tools - Error : Environment variable JAVA_HOME not set

    hi all,
    I am not able to start the java tool - Visual Admin, Configtool, etc in the solaris Bash shell.
    I was given authorizations on solaris and i'm able to view the logs and browse in solaris boxes,
    But, when i try to start Visual Admin, it says" ERROR environment variable JAVA_HOME not set "
    Since,my colleagues are using this tool for years, how come the environment variable is not set only for my user profile ?
    Is it like the environment variable has to set seperately for every user profile ?
    Do i need to set it initially for my profile eventhough it is working for others ?
    i am confused..please help.
    Addy

    Nicholls, Thanks for your quick reply.
    Ofcourse, I use my login ID to use java tools and they use their's obviously.I don't use <SID>adm.
    We WRQ reflection for X-Windows and Putty for Command line Solaris Access.
    When i try to use VA through the X-Window tool WRQ reflection, I am not able to start the tool.
    My doubt here is, Do we need to setup the environment variable for every new user initially for the first time ? ( I am a new user for this environment )
    Supposing if i need to setup the environment variable, do i need to set it up for the all the Solaris Boxes i use ?
    I am able to browse through the files.when i try to start the VA by giving ./go i am not able to start it up.
    Appreciate your time and valuable replies.
    Addy

  • How to setup ENVIRONMENT VARIABLES in WIN2K installation?

    Hi experts,
    I am trying to install nw04s on wink2 server, I want to know what environment variables do I need to setup?
    Also, Export cd's, there are 8 cd's, one of them exe, else are different. How would I make it working.I know in linux how to make it working not in windows
    Thanks,

    hi,
    In win2k you need to set the " system and user variable " for java
    right click on my computer->advanced->environment variables
    1>   name:   JAVA_HOME  ( this must be in capital)
         value:  c:\j2sdk1.4.2_11
    2> edit the "path"
    and ;c:\j2sdk1.4.2_11\bin
    then save.
    after this check this through
    cmd
    give the command "java -version"

  • Setting JAVA_HOME environment variable?

    Sorry for such a trivial question, but in Windows 2000 Server with Microsoft Visual J++ 6 and the JRK 1.1.8, can somebody tell me what the environment variables should be so that I can use this jdk? If not can you tell me what your environment variable JAVA_HOME points to?
    And one last question if it's not too much to ask. Can you tell me the NNTP server address for SUN so that I can go to the newsgroups in my News reader rather than over the web?
    Thanks.
    George Hester

    Thanks. I have a problem though. I installed the jdk 1.1.8 because I heard that was the last one supported using Visual J++. Hence I have a C:\jdk1.1.8. This folder has no JRE subfolder so I am stuck at what you said the Classpath should contain as the path\folder you say it should be does not exist.
    I have a folder C:\Program Files\JavaSoft\JRE\1.3.1 which has the lib folder containing rt.jar.
    So as you can see I'm sort of in a quandry.
    If I make JAVA_HOME as you say then it does not contain the JRE. If I make JAVA_HOME C:\Program Files\JavaSoft so that your suggestion for Classpath is correct that folder does not contain the jrk and it seems that I will not be using it.
    Any suggestions how to set this up so that it's right?
    George Hester

  • Environment variables like classpath,JAVA_HOME,path

    Sir,
    I work as a java developer in a software company.I had more problems when executing servlets."could not create the java vitual machine" error comes when i try to compile java servlet file.also I do not know that how to set environment variables like classpath,path and JAVA_HOME.Also I want to know them with proper examples.
    Thanking you.
    KRamesh

    Hi Teches
    I am facing few problem in starting eclipse 3.0 ; I had gone trogh forum , 1 of the persone suggest me to upgrade the java version.For this
    I had installed java 1.5 and set the following variable
    JAVA_HOME ---> to the home dir of JAVA
    PATH ---><home dir>/bin
    CLASSPATH --><jre>/lib
    But when ever i m giving "java -version" command on console , the result is as follows:
    C:\>java -version
    java version "1.3.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
    suggestion are welcome Plz.
    ;

  • J2EE Installation: Environment variables SETUP?

    HI there
    Can anyone help me please. I just installed J2EE and was looking for the sdk folder to set the environment variables. But instead i found a jdk folder which i am not sure about.
    Does anyone know what environment variables do i set for J2EE.
    Through some websites; it says set <J2EE_Home>\bin and also <JAVA_HOME>\bin where JAVA_HOME points to sdk1.4.2_03 (something like that).
    Am i missing anything in downloading? I mean do i have to download J2SE separately.
    I followed the following website for downloading
    http://java.sun.com/j2ee/1.4/download-dr.html
    &then "Download the Java 2 Platform, Enterprise Edition 1.4 SDK Developer Release."
    Please HELP
    Thanx

    Hi
    thanx for replying
    actually the jdk folder created in my directory just says jdk.
    The README filefrom jdk folder says the following as the header " Java(TM) 2 SDK, Standard Edition Version 1.4.2"
    Also if i go through start--> programms--> sun microsystems. It shows me J2EE1.4SDK. So after Microsystems -->its J2EE1.4 SDk ---> About J2EE1.4SDK and other options like Admin ocnsole, Deploy tool etc.
    Do u still think i have to download SDK?. Please let me know
    Thanx

  • To setup environment variables in Linux like sqlplus, emctl etc

    Hi,
    how can setup environment variable like sqlplus, emctl, etc in Linux.
    what i mean is from any directory i should be able to invoke sqplus, emctl etc
    is this posisble in linux.
    THanks,
    Philip.

    Hi Hunter,
    this one worked great. this is really cool man.
    i also have a http server running for my htmldb forms/reports.
    i created a environment variable saying
    "HTTP_HOME=/home/oracle/oracle/product/10.2.0/http_1"
    i need to go to $HTTP_HOME/Apaceh/Apache/bin"
    and i give the command "./apachetcl start" for the http server to start running.
    how can i make this apachectl variable to work so that form any directoy i should be able to give "apachectl start" comand and it runs.
    Can u help me please.
    i think if i do this also i can get some more understanding.
    the command u gave worked great, but i did not understand the
    LD_LIBRARY_PATH and CLASSPATH. what are they for.
    Philip.

  • Installed jre and jdk and setup environment  variable

    installed jre and jdk and setup environment variable but still i am not able to rum program?
    cannot find symbol class string
    package system does not exist

    if removing 1 jre will help your disk space problems
    then you urgently need a bigger disk.
    Btw i never notice Java installing 2 different JRE's
    so i dont think it will harm remvong one, make sure
    you dont delete one you are using :)I assume that you don't run MS os; that's the only one that installs 2 JRE's.
    To OP: This has been discussed by Sun, but no changes have been announced. Maybe the relocation in version 1.5 of the private (aka developer) code to the Program Folder is a start of this change?

  • Error Setting Environment Variable inside Listner.ora

    Hi,
    I am trying to set an environment variable inside listner.ora as follows
    (ENVS="EXTPROC_DLLS=ANY,LD_LIBRARY_PATH=/opt/app/oracle/product/9.2/lib32:/opt/app/oracle/product/9.2/network/lib32:/usr/lib:/usr/X11R6:/usr/dt/lib,LIBPATH=/opt/app/oracle/product/9.2/lib32,MQSERVER=SYSTEM.DEF.SVRCONN/TCP/ashsou03.mcilink.com(4444)")
    but every time I try to start the listner it gives me the following error:
    TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in LISTENER.ORA
    NL-00303: syntax error in NV string
    I think that the parenthses, (4444), in the MQSERVER value is causing this. Any ideas on how I can configure it?

    Hi
    Very many thanks for ur solution.. i actually hadset the environment variables spacce..but when i execute the autoexec.bat file i dont get any error(out of env space)..but when i run the startup.bat file i get from the command prompt, i get the foll error.
    This is my Autoexec.bat
    SET JAVA_HOME=D:\Jkit\bin
    SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29\bin
    SET PATH=D:\Jkit\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
    THE FOLLOWING IS THE ERROR I GET WHEN I RUN STARTUP.BAT UNDER TOMCAT'S BIN UNDER THE COMMAND PROMPT
    D:\tomcat\jakarta-tomcat-4.1.29\bin>startup
    Syntax error
    Out of environment space
    Out of environment space
    Out of environment space
    Using CATALINA_BASE: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_HOME: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_TMPDIR: D:\tomcat\jakarta-tomcat-4.1.29\temp
    Using JAVA_HOME: D:\Jkit
    Out of environment space
    Out of environment space
    Invalid switch - -DJAVA.ENDORSED.DIRS=D:\TOMCAT\JAKARTA-TOMCAT-4.1.29\COMMON\ENDORSED
    I even set JAVA_HOME AND CATALINE_HOME to the \bin dir respectively..
    still i get the same error
    As given under the tomcat installation documentation (RUNNING.txt), i set the space for environment space under the Memory tab, for startup and shutdown.bat files, it creates a shortcut for running the resp .bat files, running startup.bat file i get,CATALINA_HOME VAR HAS NOT BEEN SET PROPERLY, THIS OCCURS FOR BOTH TOP LEVEL DIR SETTING AND /bin DIR SETTING of CATALINE_HOME IN autoexec.bat
    PLEASE HEL, I HAVE BEEN TRYING TO CONFIGURE IT FOR THE PAST DAYS BUT WITH NO SUCCESS, DONT KNOW WHERE I AM GOING WRONG..PLEASE HELP

  • How to set environment variables for Tomcat on mac osx 10.8.5

    How do I set up my environment variables - JAVA_HOME and CATALINA_HOME on my iMac running mac osx 10.8.5?

    You need to create a setenv.sh script in the tomcat bin directory. The link is an example that you will need adjust- http://www.unidata.ucar.edu/software/thredds/current/tds/tds4.2/tutorial/Getting Started.html

  • How do I use Embed with an environment variable in an Actionscript AIR project Flash Builder 4.7

    I am using Flash Builder 4.7 to build an Actionscript AIR project.  The project embeds a number of png files from my local directory and I have been using absolute paths which all works fine.
    I have a laptop with which I want to start developing the same project - I set up a git repository that both the laptop and main pc can pull from and so I can get the source where I need it and push it back to the central repository.
    My problem is that the absolute paths for the embed commands don't work on the laptop as it has a different filesystem setup (Windows 8 with one drive as opposed to Windows 7 with a SSD and a data drive).  I thought the solution would be as easy as using an environment variable to specify the path which could then point to a different physical directory on both machines, i.e:
    [Embed(source = "DEVELOPER_RESOURCES/graphics/are/here.png"]
    I did a bit of research and there was quite a lot mentioned about setting up resource directories using path variables which I worked through but I just can't get it to compile.  The Actionscript compiler just won't find the png files however I specify the path.  I tried something with a FLEX project and the compiler didn't complain but I think this is because the compiler for FLEX uses a different convention.
    [Embed(source ="/Project Name/DEVELOPER_RESOURCES/graphics/are/here.png"]  works with FLEX but not Actionscript.
    So does anyone have a recipe for using the Embed command referencing assets using an environment variable that works across multiple machines with different file structures?

    I managed to find a solution on Windows which was to use symlinks and absolute paths.  You an basically point one directory to another so I did something like:
    mklink c:\developer_resources c:/the/local/path/to/my/resources
    and then reference all resources as c:\developer_resources\...
    Now as long as a developer machine has the right link (from c:\developer_resources to the place where the resources are kept) then it seems to work. 
    This doesn't however work for Mac and certainly isn't a solution for passing files between Mac and windows

  • Open module for managing property file and environment variables

    Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
    Any ideas are greatly welcomed.

    You seem wright, you hit a brick wall here with Air to find the location
    of the command console on windows...
    So in fact I never build an exe tool, but this little problem was a nice
    case to test it and I tried it.:
    I downloaded monodevelop
    -GTK# for .NET 2.12.10*
    -MonoDevelop 2.4.2*
       from http://monodevelop.com/Download
    created a console project and had an exe in 5 minutes !
    You can download the findconsole tool and the projectfiles here:
       http://greencollective.nl/temp/dump/findconsole_monoproject.zip
    findconsole.exe will reveal the path/location of cmd.exe on a windows system.
    Cheers,
    Latcho

Maybe you are looking for