FAQ
Off course there is still a lot that may go wrong.
The JSL won't start JRockit
Set the jvmtype parameter in the jsl.ini file to jrockit. JRockit uses a strange naming convention for the JVM location. It's located
in jre\bin\jrockit\jvm.dll.
Another approach is to move the jrockit folder to jre\bin\classic\jvm.dll and it will work nicely.
Which Java Runtime Environment is used when I start the jsl?
JSL attempts to find the JRE in the following location in the order given.
For details look into java_md.c,
- It reads the jrepath parameter from the configuration file
- It loks for a java.dll in the bin directoy colocated with the jsl.exe
- It loks for a java.dll in the jre\bin directoy colocated with the
jsl.exe
- It looks for JRE path in the registry
The service won't start and I can't see why.
Try to start it in debug mode first. Run it as a service only when you are
sure that there are no serious bugs in it.
How can I make sure the JAVA application is restarted after it fails
JSL doesn't care about this, but Win2000 (Server) comes with
tools to monitor and automatically restart service. Those tools will usually rely on the
service return code to decide if the shutdown was normal or abnormal. JSL has a number of settings to
pass the the java exit code or to react to exception in appropriate ways.
See 'exceptionerrorcode' and 'onexiterror' settings in the configuration file.
The program did run fine in debug mode but can't find files when run
as a service
Don't rely on the standard path when locating files from the service. Always
use absolute paths. The service will find it's start path through a java system
property. You can use environment substitutions now but be careful and make
your first tries without them.
How can I find out from which directory the service was started and
how it is named
The JVM is started with a command line similar to this one.
java -Dservice.stop.port=8465 -Dservice.path=E:\Java\TEST\jsl_0_9\Debug\
-Dservice.name=TelnetEcho -cp e:\java\test\jsl_0_9 TelnetEcho
The -D options can be accessed through the System Properties. Look in class
java.lang.System for details.
The program did run fine in debug mode but still does not find the
files it needs though I load them from an absolute path.
Drives mounted from a network device are not accessible from a service!
Access them through fully qualified network names.
\\myserver\myfiles\myservice\hello.data
The program did run fine in debug mode but is denied access to the
network shares I need
In standard settings the service will run as a system user. Sytem user can't
access the network. You need to change the security settings manually in the
NT service manager.
There may be other more exotic errors which could result from this.
The service runs fine but I can't stop it. Service manager tells me
the stop request failed and I can't stop it using the task manager.
Services can not be stopped forcedly (except with a debugger). They must stop themselves. That's
what the JNI calls into the running JVM are for. You may also use the stopable interface. Please see the HowTo guide.
To get rid of your service you must either restart NT (after you set service
starting mode to manual) or use a C debugger to attach to and kill the service.
|