Brandon said:
A couple things that could cause it to not work:
1) Since Java requires a a classpath to work correctly it is possible
that when the items listed in the registry to automatically start the
classpath isn't set and so java errors out trying to run your jar.
Whether this is null and void by converting it into an exe using
Launch4j I don't know since I don't know how that works.
2) Try specifying the full path to your java.exe and specify the data in
the Run key by using the normal syntax for running a jar with java.exe
(by using -jar switch):
"c:\Program Files\java\jre1.6.0\bin\java.exe" -jar yourjar.jar
Also look at the Application/System event logs to see if there is
anything useful in there.
No errors in the logs...when I run the command java -jar
"D:\Program Files\TGDTJ\tgdtj.jar" as the registry key I get the
following error
java -jar "D:\Program Files\TGDTJ\tgdtj.jar" Exception in thread "main"
java.lang.UnsatisfiedLinkError: ca.beq.util.win32.reg
istry.RegistryKey.testInitialized()V at
ca.beq.util.win32.registry.RegistryKey.testInitialized(Native Method)
at
ca.beq.util.win32.registry.RegistryKey.initialize(RegistryKey.java:25
6) at ca.beq.util.win32.registry.RootKey.<clinit>(RootKey.java:88) at
xlinuks.RegistryEditor.hasStartUpEntry(RegistryEditor.java:48) at
xlinuks.gui.XMenuBar.createViewMenu(XMenuBar.java:182) at
xlinuks.gui.XMenuBar.<init>(XMenuBar.java:31) at
xlinuks.MainClass.init(MainClass.java:84) at
xlinuks.MainClass.main(MainClass.java:35)