On 3/15/2011 4:56 PM, Caldarale, Charles R wrote:
You have a *server* JVM installed on Windows XP?  Want to verify that?

Like I said, $JAVA_HOME/bin/server/jvm.dll is there. I did nothing
special: I just ran the installer.

If --StartPath is omitted Tomcat attempts to start in the
local directory, which of course fails; this is very puzzling,
as one would expect it to start under the install directory
by default (and yes --Install was supplied)

Why would you expect that?  This is a service, not a user logon environment.

Service or not it is apparently looking for a number of its files
under the start dir because if it is not set I get

$ $CATALINA_HOME/bin/tomcat7 //TS//Tomcat7 --LogLevel=DEBUG
Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false], 
isDirectory: [false], canRead: [false]
Mar 15, 2011 5:48:59 PM org.apache.catalina.startup.ClassLoaderFactory 
validateFile
WARNING: Problem with directory [C:\work\tomcat\lib], exists: [false], 
isDirectory: [false], canRead: [false]
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:217)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:406)

So I don't see how this could succeed with StartPath set to anything
but the installation directory.

In addition, this ClassNotFoundException even though the classpath was
correctly set is bizarre, too: it should be looking for its jars under
the classpath, not under the start path.

Where is it safe to use env. vars so as to shorten the
invocation a bit?

Never; again, this is a service, so there are no environment variables.

But the HOWTO explicitly says it is safe to use them in the --Jvm option:
"You can use the environment variable expansion here."

Since you target Java 5 and above maybe you could start using
the star syntax in the classpath to shorten things a bit further

Please give a specific example of how this might be useful.

Just in the interest of brevity, i.e., --Classpath "C:\Java\tomcat-7.0.11\bin\*"
instead of --Classpath 
"C:\Java\tomcat-7.0.11\bin\bootstrap.jar;C:\Java\tomcat-7.0.11\bin\tomcat-juli.jar"
It works fine; I tried it.

-- O.L.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to