|
From: Joseph K. <joe...@tr...> - 2003-02-06 22:20:16
|
Hi folks, new subscriber here. Yes, I've read the FAQ and the rest of the documentation, and I believe I've understood it. So I think the following is a bug, but I'm not sure if it's a bug in Wrapper.exe or a bug in Windows XP. Here is my App.conf file (names have been changed to protect the innocent): ---- wrapper.logfile.loglevel=DEBUG wrapper.java.command=C:/Software/j2sdk1.4.0_02/bin/java.exe wrapper.java.mainclass=com.transcore.app.TheAppMain wrapper.java.library.path=%PATH% wrapper.java.classpath.1=%CLASSPATH% wrapper.ntservice.name=PcTcsExecutive wrapper.ntservice.displayname=TCApp wrapper.ntservice.description=TCApp NT Service wrapper.ntservice.starttype=DEMAND_START ---- All I want is for my app to use the system-defined CLASSPATH, instead of manually specifying all of twenty or so different directories in App.conf. Now, this all works just dandy when I start my application at the command line, using C:> Wrapper.exe -c App.conf However, if I install and start it as a service: C:> Wrapper.exe -i C:\TCApp\App.conf C:> net start TCApp everything goes to hell in a handbasket, because, bizarrely, the CLASSPATH environment var is not read properly. In the resulting command reported by the wrapper, I see either '-classpath "LASSPATH' (in which case the JVM can't start because the command line is totally hosed by the bare double-quote), or '-classpath "6.579413e"' (in which case the JVM exits because, understandably, it can't find my App.class file in the mutilated classpath). At this point, I'm willing to blame XP for this insane behavior wrt the environment variable CLASSPATH. But Wrapper.exe seems to be going out of its way to make it difficult to work around this problem: I've tried running with no wrapper.java.classpath in App.conf, thinking that the JVM would use the system CLASSPATH environment variable in that case. But Wrapper.exe supplies an explicit '-classpath .' argument, which is just useless. Why does Wrapper.exe do that? Is it a security issue, or something? Any suggestions for a workaround? Thanks, -- Joe Knapka |