Setting java_home nd tomcat_home

Why to set JAVA_HOME and TOMCAT_HOME?

You set JAVA_HOME, i believe, so that Tomcat can access java from within its own scope. it has to launch process in the JVM since it is, itself, a java program. If the JAVA_HOME is not set, then it won't know how to access java otherwise. I think the TOMCAT_HOME is for it to know how to access its own web apps, for when it sets paths at launch, stuff like that.
Don't ask questions, just do it! it's all voodoo anyways...

Similar Messages

  • Set JAVA_HOME & Tomcat

    If u r familiar with tomcat you can probably help me. This is my deal I (from c:\jakarta-tomcat-3.2.3):
    set JAVA_HOME=c:\jdk1.3.1
    set TOMCAT_HOME=c:\jakarta-tomcat-3.2.3
    and then bin\startup and it works fine, HOWEVER, when I try to open tomcat by from the actual startup.bat file in c:\jakarta-tomcat-3.2.3 by clicking on it I get a window that tells me, and I quote,
    "You must set JAVA_HOME to point at your Java Development Kit installation"
    Why do I get this message? Why am I able to startup from the prompt just fine, but not the way I just described(by actually going to the startup.bat file)?
    Thank you to all the JAVA geeks...just kidding, I strive to be like u
    Pedro

    If you want the scripts to run by double clicking on them, you must set JAVA_HOME and TOMCAT_HOME permanantely in your autoexec.bat or you control panel. Setting them on the command line each time will not help. Try adding these lines to your autoexec.bat or the system program in the control panel:
    set JAVA_HOME=c:\jdk1.3.1
    set TOMCAT_HOME=c:\jakarta-tomcat-3.2.3

  • How to set JAVA_HOME in REDHAT 9.0 Linux?

    I was trying to set JAVA_HOME in profile file, but unable to decide where to put the java_home path. Can anyone guide me?
    J2sdk and JRE are in /USR/JAVA

    It is sufficient to set PATH.
    In Unix (including Linux) most file systems are case-sensitive regarding the file and directory names. So /USR/JAVA is different from /usr/java.

  • P6v7 Web Services Oracle Universal Installer Error Setting Java_Home veriab

    Hi,
    I am installing Primavera P6 v7 web serivces on a Ms Windows 2003 SP2 server machine but it gives error "error setting Java_Home environment variable" every time i run the oracle universal installer setup of P6 v7 web services. I have already installed Java JRE1.6.0_14 and set the JAVA_HOME variables in both system and user variables. I have also tried manually setting path of JAVA during setup but no luck so far everytime same error. I have been looking at the log file in oracle inventory folder but did not find any hint to resolve the issue.
    Please suggest a solution or workaround.
    Regards,
    Shahid

    r u using 32bit or 64bit java?? better to use 32 bit java. Create 3 variable for EPPM P6
    1) variable name: JAVA_HOME Value: c:\Java32\JRE1.6.0_27
    2) variable name: JRE_Location value: c:\Java32\jdk.1.6.0_27\jre
    3) variable name: p6_java_home value: c:\Java32\jdk.1.6.0_27

  • Setting java_home env variable

    It looks like this java_home variable thing is gonna give me enaf trouble. Now I am sure i have done all as outlined in the release notes and cJDK_Users_Guide especially on "installation". There surely must be something wrong with my machine or jdk. Some body send me the full list of possible causes and suggested solutions.
    Problem is in this institution nobody seems understand what I am talking about

    First off, in your previous post, you provided your environment script:
    @echo off
    set jc_home = c:\java_card_kit-2_2_1
    set java_home = c:\j2sdk1.4.1_07
    Note that the spaces on either side of the equals sign are incorrect. The way you have it currently, the space is part of the key and value.
    "java_home<space>" does not equal "java_home", likewise "<space>c:\j2sdk1.4.1_07" does not equal "c:\j2sdk1.4.1_07".
    Remove the spaces and you will be OK.
    "Problem is in this institution nobody seems understand what I am talking about"
    Your problem seems to be related to your understanding of the windows command line - nothing to do with Java or Javacard.
    - Joscar

  • How to set JAVA_HOME programatically

    Hi Friends,
    Is there anyway to set JAVA_HOME environment property using a batch script.Actually,I am trying to check if the user system has java installed or not. If not,I make him run the JRE installer but the problem is when I try to start Tomcat, it expects JAVA_HOME to be set. So, I want to set JAVA_HOME programatically, is there anyway to do so???
    This is the script i am using to check if java is already installed or not:
    @echo off
    ::This batch file only tested under Windows 2000
    ::It will detect the short path of the current version
    ::of the Java runtime executable
    ::First test to see if we are on NT or similar OS by seeing
    ::if the ampersand is interpreted as a command separator
    reg1.txt echo 1234&remtype reg1.txt | find "rem"
    if not errorlevel 1 goto WIN9X
    ::Find the current (most recent) Java version
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    type reg1.txt | find "CurrentVersion" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java Version = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Get the home directory of the most recent Java
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\%JavaTemp%"
    type reg1.txt | find "JavaHome" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java home path (per registry) = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Convert double backslashes to single backslashes
    set JavaHome=
    :WHILE
      if "%JavaTemp%"=="" goto WEND
      if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
      for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
      for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
      goto WHILE
    :WEND
    set JavaTemp=
    echo Java home path (long, with spaces) = %JavaHome%
    ::Convert long path (with spaces) into a short path
    for %%x in ("%JavaHome%") do set JavaHome=%%~dpsx
    echo Java home path (short path, no spaces) = %JavaHome%
    ::Test the java path to see if there really is a java.exe
    if not exist %JavaHome%\bin\java.exe goto ERROR
    ::Make changes to the PATH
    echo Insert code here that needs to know the short path to Java.
    set path=%JavaHome%\bin;%path%
    goto DONE
    :WIN9X
    echo Insert code here for Windows 9x
    goto DONE
    :ERROR
    echo Insert code here for conditions where Java.exe can't be found
    goto DONE
    :DONEThanks

    You are asking questions about Windows batch scripting in a Java forum?
    When you get right down to it, the question is "How do I set an environment variable in a batch script", isn't it? Free your mind from useless distractions: the batch script and the operating system don't care at all what you're going to use that environment variable for.
    Oh yeah, I almost forgot: you use the SET command to set an environment variable.

  • Set JAVA_HOME before running cloudscape -start

    Hi
    after i installed J2EE , i have made the following steps through DOS :
    1- set J2EE_HOME=C:\j2sdkee1.2.1
    2- set PATH=%PATH%;C:\j2sdkee1.2.1\bin
    3- cloudscape -start ---- in this step i have got an error saying "set JAVA_HOME before running this script" how can i solve this error
    with best regards

    Hi
    after i installed J2EE , i have made the following
    steps through DOS :
    1- set J2EE_HOME=C:\j2sdkee1.2.1
    2- set PATH=%PATH%;C:\j2sdkee1.2.1\bin
    3- cloudscape -start ---- in this step i have got an
    error saying "set JAVA_HOME before running this
    script" how can i solve this error
    with best regardshello,
    You did not set the variable JAVA_HOME. Set it to the home directory where the jdk is installed. For that give the command like set JAVA_HOME=C:\jdk1.3.1 in the DOS Prompt along with setting the J2EE_HOME and PATH variables...
    you may also make a new system environment variable JAVA_HOME and assign the jdk home path to it so that u need not set it everytime for a new DOS Window..
    hope that helps..
    -Jer

  • Setting java_home through java code

    Hello , i went through lots of information for setting java_home through java code but i was unable to find any useful information, does anybody know how to set java home through java code
    Regards
    Mayur Mitkari

    The question doesn't make any sense to me. If Java needs the JAVA_HOME variable set, how is it ever going to execute any code that does so? And if it doesn't need it, why set it?

  • Setting 'JAVA_HOME' in batch file

    Hi,
    I'am having a batch file for my Java application. I want to set the 'JAVA_HOME' variable if it is already not set.
    I want to confirm if the following statement is correct or if there is a better way to do so.
    if "%JAVA_HOME%"=="" set JAVA_HOME=c:\j2sdk1.4.1_02
    Thanks in advance.
    Regards,
    Jay

    You can also:
    SET JAVA_HOME %JAVA_HOME%;C:\j2sdk1.4.1_02
    That'll add the new pointer along with any others that are there already, if none exist then it will create the one pointer.

  • How to set JAVA_HOME

    Hi,
    can any body tell how to set the JAVA_HOME variable for the
    windows 95/98 operating system. Iam using the "jakarta-tomcat-3.2.1"
    server for running the jsp files. I could do it in window NT os by setting up in the environment option of the mycomputer properties. I
    couldn't know how to set it in the window 95/98 os
    phani

    To set the JAVA_HOME variable in Windows 95/98 you have to edit the file autoexec.bat located on your hard drive and add a line similar to this one.
    SET JAVA_HOME=C:\J2SDK1.4.1
    Where c:\j2sdk1.4.1 is the directory where java is installed.
    Hope this helps.

  • How to set JAVA_HOME in solaris9

    hello all,
    Do some one give me some url's or information how to set JAVA_HOME, CLASSPATH and related environmental setting for SOLARIS 9 operating system.
    thanQ,
    Han.

    solaris is the unix-like OS
    so try to find the same info about linux, freebsd or other unix os
    in general try export or set command

  • 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

  • Java_es-5-websuite-ga-windows-x86 installation issue not setting JAVA_HOME

    looks like the installer from java_es-5-websuite-ga-windows-x86.zip is not setting the JAVA_HOME variable correctly.
    C:\Sun\JavaES5\DSEE\dscc6\bin>dsccsetup.exe initialize
    Failed to create child process ["1/bin/java.exe" -Dsun.directory.clip. [...]

    Sorry for the late response. Do you need the other components provided by JES? If not, I suggest installing DSEE from the zip installer which can be downloaded separately. If you have to use JES and the problem is still not resolved, please log a case with Sun.

  • Setting JAVA_HOME

    Hiye I�m using win2000 and I cant seems to set my JAVA_HOME variable environment.
    Here is what I�ve done. variables =JAVA_HOME and value=jdk.1.3.3
    I cant seems to compile or run my java program without going into jdk1.3.3/bin.
    Any idea?

    Make sure you set the full path, plus the bin folder:
    JAVA_HOME
    C:\Java\jdk1.3.3\bin
    Strider <><

  • Linux: how to set JAVA_HOME in startup script?

    My Linux box cannot find JDK classpath.
    How do I set CLASSPATH and JAVA_HOME in a script file that is loaded at startup?
    Thanks!

    What are you trying to do? If you are executing a script that runs a java process in cron, or something, then simpl place these lines in that script before the call to java.
    All environment variables are set when the shell starts. Every process is run under a shell, and that shell is what has the environment variables. Which environment variables it has, depends on which shell is started, and how that shell is started.
    Cron, and some users, have a very limited shell environment. Even these shell environments are configurable though. How this is done, however, is not a topic for this forum.

Maybe you are looking for

  • Implementation Of Badi ME_GUI_PO_CUST for adding fields in Purchase Order

    Hi All    I am implementing BADI ME_GUI_PO_CUST / ME_PROCESS_PO_CUST to add additional fields in Purchase Order. The implementation of the BADI ie the Subscreen of the fields to be added appears in  transaction ME23N but it does not appear in the tra

  • Cant accept agreement?

    On my notebook it wont go all the way down to the accept button to agree. I really hate having to go to town to print sumthing, please help solve this problem

  • Background jobs failing with ABAP/4 processor: RFC_CONVERSION_FIELD

    Hi Guru's, Below are the backgroud jobs failing with runtime Error " ABAP/4 processor: RFC_CONVERSION_FIELD" in  solution manager system (solution manager 3.0,SR2). Not sure why all these jobs failing with this dump on of sudden. i haven't made any c

  • Mailbox Move ForceOffline Parameter

    Hell all, scenario: Exchange 2013 RTM CU3, Exchange 2013 SP1 DAG I'm trying to find a way to speed up Mailbox moves (local - from the RTM to the DAG environment) and I've pretty much exhausted all options I am aware of (MRS parameters, TCP Chimney, R

  • CAN NOT OPEN UP FIREFOX...ERROR ENTRY POINT CAN BE ACCESSED FROM XUL.DLL

    '''3rd time have been locked out.....can not access mozilla or important sites....error '''reads..... The procedure entry point NS_Set Dl Directory could not be located in the dynamic link library xul.dll.......urgent repair needed.....even when inte