dso-env.bat should not modify or set non TC env vars
----------------------------------------------------
Key: CDV-719
URL: https://jira.terracotta.org/jira//browse/CDV-719
Project: Community Development
Issue Type: Bug
Reporter: Geert Bevin
Assignee: Issue Review Board
(note, that this is for the book, so that a simple example can be presented to
the user about how to integrate Terracotta in an existing Tomcat installation,
so it's rather urgent)
I've been trying to get Terracotta to work easily on Windows with an existing
Tomcat installation. For that I create a setenv.bat file in the bin dir with
these instructions:
set TC_INSTALL_DIR="C:\terracotta-2.7.0-snapshot"
set TC_CONFIG_PATH="localhost:9510"
call %TC_INSTALL_DIR%\bin\dso-env.bat -q
set JAVA_OPTS=%TC_JAVA_OPTS% %JAVA_OPTS%
With this, Tomcat fails to startup due to an error while running their
setclasspath.bat file.
I tracked this down to our boot-jar-path.bat script (which is used by
dso-env.bat) that always surrounds an existing JAVA_HOME env variable with
double quotes. This causes the line
if not "%JAVA_HOME%" == "" goto gotJdkHome
to fail in setclasspath.bat of Tomcat.
The reason is the following line from boot-jar-path.bat:
set JAVA_HOME="%JAVA_HOME:"=%"
I think that dso-env.bat should have no side-effects at all on existing
non-Terracotta environment variables. It's also weird that JAVA_HOME is by
default set in boot-jar-path.bat to the JRE that ships with Terracotta for the
entire environment, if it wasn't there before. That makes using dso-env.bat a
lot less appealing.
----
More discussion about it here:
http://lists.terracotta.org/pipermail/tc-dev/2008-April/002661.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev