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

Similar Messages

  • 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.

  • 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...

  • 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 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

  • Problems setting up Tomcat with RoboHelp Server V8

    Hi,
    My Systems Administrator is trying to set up RoboHelp Server version 8 for me. he has been following the Adobe Installation guide and has got as far as page 10 where it tells him to install and configure IIS and TomCat, at this point he says he does not understand what he should be doing. He has not installed TomCat before and it is telling him to configure the tomcat directory and although he has tried using what it says it comes up with an error the directory does not exist.
    He is using:
    Windows 2008 Server Standard
    IIS 7.0
    TomCat 6.0.20
    SQL Server 2008 express SP1 - this is the latest version the adobe instructions says RooHelp Server works with SQL Server 2008 but does not mention express not sure if that could be a problem?
    MS Report Viewer 2008 SP1
    Java V6 Update 12
    He says the installation guide talks about a directory with Win32 in it which does not appear on his machine its a 64 bit machine.
    Please can someone give me some instructions on how to set up the TomCat part - I have looked but the troubleshooting that adobe has does not seem to be for Windows 2008 only Vista and XP and even then it says nothing about setting up TomCat
    Thanks in advance
    Erika

    Erika
    Not an area I can help with but try this post. http://forums.adobe.com/thread/204737?tstart=0
    Also look through the forum. There are some detailed posts on this.
    Finally take a look at http://notcolin.wordpress.com. There are some relevant blogs there.
    See www.grainge.org for RoboHelp and Authoring tips

  • 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 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

  • Help setting up tomcat 4.1

    Hi,
    I have written up a batch file as follows....
    set JAVA_HOME=c:/j2sdk1.4.2_01;
    set CATALINA_HOME=H:/tomcat4.1;
    set classpath=;c:/j2sdk1.4.2_01/lib
    set path=%PATH%;c:/j2sdk1.4.2_01/bin
    when I go to the bin directory and type in startup command,at the command prompt,I get CATALINA_HOME variable not set properly.What could be the problem.Help me out with this.
    Thanks
    AS

    What OS are you using, the vars look like windows but the /'s look like Unix?

  • How set up Tomcat 5?

    Hi,
    how do i set up tomcat 5 to be "JSF-enabled"?
    Which jars must be shipped with my JSF-Webapp?
    What have to be done?
    Best regards,
    Thomas

    Hi Matthias,
    Sorry about my boring posts, but i think i must post everything:
    It's a app called squarecalc:
    Ok, first the web.xml:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
        version="2.4">
         <!-- #############  Faces Servlet  #############  -->
         <servlet>
              <servlet-name>JavaServer Faces Servlet</servlet-name>
              <servlet-class>
                   javax.faces.webapp.FacesServlet
              </servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- ############# Mapping ###############  -->
         <servlet-mapping>
              <servlet-name>JavaServer Faces Servlet</servlet-name>
              <url-pattern>/faces/*.jsf</url-pattern>
         </servlet-mapping>
    </web-app> The faces-config.xml:
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
         <navigation-rule>
             <from-view-id>/faces/eingabe.jsf</from-view-id>
             <navigation-case>
                    <from-outcome>success</from-outcome>
                    <to-view-id>/faces/ausgabe.jsf</to-view-id>
             </navigation-case> 
         </navigation-rule>
           <managed-bean>
                <managed-bean-name>Square</managed-bean-name>
              <managed-bean-class>com.edu.jsf.bean.SquareBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>The eingabe.jsf:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <head>
         <title>Berechnung eines Fl�cheninhaltes</title>
    </head>
    <body>
    <f:view>
         <h3>JSF-Beispielanwendung zur Berechnung eines Fl�cheninhaltes:</h3>
        <i>Dieses Programm berechnet aufgrund der Eingabe einer
        Seitenl�nge den Fl�cheninhalt eines Quadrates.</i>
        <br><br>
        <h:form id="inputForm">
              Bitte geben Sie eine Seitenl�nge ein:     
              <h:inputText value="#{Square.length}" />
              <h:commandButton value="Berechnen" action="success" />
         </h:form>
    </f:view>
    </body>
    </html>The ausgabe.jsf:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
    <head>
         <title>Berechnung eines Fl�cheninhaltes</title>
    </head>
    <body>
    <f:view>
         <h3>JSF-Beispielanwendung zur Berechnung eines Fl�cheninhaltes:</h3>
        <i>Dieses Programm berechnet aufgrund der Eingabe einer
        Seitenl�nge den Fl�cheninhalt eines Quadrates.</i>
        <br><br>
        <h:form id="inputForm">
              Ergebnis der Berechnung<br><br>
              Ihre Eingabe war: <h:outputText value="#{Square.length}" />
              <br>
              damit ist der Fl�cheninhalt: <h:outputText value="#{Square.area}" />
         </h:form>
    </f:view>
    </body>
    </html>The SquareCalc.java:
    package com.edu.jsf.bean;
    public class SquareBean {
         private int length;
         private int area;
         public int getArea() {
              return length*length;
         public int getLength() {
              return length;
         public void setArea(int i) {
              area = i;
         public void setLength(int i) {
              length = i;
    }The directory-structure:
    tomcat-root
    -webapps
    --squarecalc
    ---faces
    ----ausgabe.jsf
    ----eingabe.jsf
    ---WEB-INF
    ----classes
    ----lib
    ----tldsIn classes is of course the SquareClalc-Bean.
    In lib is:
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    jsf-api.jar
    jsf-impl.jar
    In tlds is:
    html_basic.tld
    jsf_core.tld
    Sorry for the long and boring posting.
    Best regards & thanks
    Thomas

  • How to resolve the issue "ignoring compiler setting" in Tomcat Web Server

    Hi All,
    In the Environment set up
    jdk1.3.1_09
    Apache Tomcat 4.1.24
    I'm getting the following error when i request a jsp file.
    Please help to solve this issue.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jsp\ConnectionPooling_jsp.java:44: cannot resolve symbol
    [javac] symbol : class PCSTDatabaseConnectionPoolingBean
    [javac] location: class org.apache.jsp.ConnectionPooling_jsp
    [javac] PCSTDatabaseConnectionPoolingBean connectionpool = null;
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jsp\ConnectionPooling_jsp.java:46: cannot resolve symbol
    [javac] symbol : class PCSTDatabaseConnectionPoolingBean
    [javac] location: class org.apache.jsp.ConnectionPooling_jsp
    [javac] connectionpool = (PCSTDatabaseConnectionPoolingBean) pageContext.getAttribute("connectionpool", PageContext.SESSION_SCOPE);
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jsp\ConnectionPooling_jsp.java:49: cannot resolve symbol
    [javac] symbol : class PCSTDatabaseConnectionPoolingBean
    [javac] location: class org.apache.jsp.ConnectionPooling_jsp
    [javac] connectionpool = (PCSTDatabaseConnectionPoolingBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "PCSTDatabaseConnectionPoolingBean");
    [javac] ^
    [javac] 3 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:479)

    [javac] PCSTDatabaseConnectionPoolingBean connectionpool = null;
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jsp\ConnectionPooling_jsp.java:46: cannot resolve symbol
    The compiler doesn't know what PCSTDatabaseConnectionPoolingBean is. Have you properly imported the class?

Maybe you are looking for

  • I have a problem in activate Alaaclaud account and I can not open the device

    السلام عليكمI have a problem in activate Alaaclaud account and I can not open the device

  • Can't get PSE 12 to Launch

    My PSE 12 was uninstalled when a system restore was run. I reinstalled it but the program will NOT launch from the desktop icon. It ran through the install process with no trouble...no error messages and is listed in my downloaded programs.But It wil

  • Gnome-java Widget question (sorry if this is the wrong section)

    I have created three files, yes i know naming conventions and spelling is an issue, but bare with me. I plan to clean all this up as soon as I get this issue figured out. right now I am flinging mud like a howler monkey. File One is a test file that

  • Unicode solution in CRM 4.0

    Hi all,   what does unicode solution in CRM 4.0 mean. In mobile sales or in people centric UI , will in the same screen 2 differenct languages are displayed like chinese and japanese are displayed on the same screen. when will the customer implement

  • Cannot Add new line using BI IP query

    Hi All, We have created a planning application (BI IP Query) and used it in VC 7.1 model using BI Query Wizard service. Now we are able to customize existing rows ( existing rows are using flat file upload)... we can able to change the existing recor