tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: java_home in tomcat6
Date Wed, 30 Jul 2008 10:15:04 GMT

----- Original Message ----- 
From: "zorglub76" <>
To: <>
Sent: Wednesday, July 30, 2008 10:58 AM
Subject: java_home in tomcat6

> Hi all,
> I have a problem with setting JAVA_HOME variable in Tomcat 6.0.16.
> When I set it in catalina.bat as:
> set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07
> set JRE_HOME=C:\Program Files\Java\jdk1.6.0_07\jre
> I get an error:
> Files\Java\jdk1.6.0_07"" was unexpected at this time.
> But when I do exactly the same in Tomcat 5.5.26, everything goes well:
> Using CATALINA_BASE:   C:\apache-tomcat-5.5.26
> Using CATALINA_HOME:   C:\apache-tomcat-5.5.26
> Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.26\temp
> Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_07\jre
> I tried to embrace java_home value with quotation marks or apostrophes, 
> but
> the error remained.
> Any ideas?
> -- 
> View this message in context: 
> Sent from the Tomcat - User mailing list archive at

DOS is just painful....

I think somewhere its been set like this...

set JAVA_HOME="C:\Program Files\Java\jdk1.6.0_07"

should be

set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07

then later its doing something like \bin

and thats becoming

"C:\Program Files\Java\jdk1.6.0_07"\bin

and thats the error...

Turn off echo at the top of the page

@echo off
rem @echo off

so you can see what every line does...


echo %JAVA_HOME%

will show you what it actually is at various places...

I think its been set twice somewhere....

Good luck...

BTW... on windows I find its easier to just let users install the service... 
you can change it from there...
And in Netbeans... instead of messing with tomcat bats... just install all 
the versions and show NB where they are from the server manager... then you 
can just tell your webapp which TC to use in the run properties...

ie... we never ever have to play with the BAT files on windows... nor does 
the client..

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message