Windows Startup

J

JediKnight2

Why would a .jar file not startup if a key was set in
HKLM\Software\Microsoft\Windows\CurrentVersion\Run

The location is correct...I have even tried to convert it into an exe
using Launch4j and it wont start using a registry key..
 
C

Chris

JediKnight2 said:
Why would a .jar file not startup if a key was set in
HKLM\Software\Microsoft\Windows\CurrentVersion\Run

The location is correct...I have even tried to convert it into an exe
using Launch4j and it wont start using a registry key..

Don't know, but Install4j, made by the same people, has an option that
will let you start a java app as a service. Might be a better option.
 
J

JediKnight2

Yup...starts by double clicking as well...in addition, if I throw a
shortcut into the startup folder it starts...
 
A

Andrew Thompson

JediKnight2 said:

Please refrain from top-posting.
...starts by double clicking as well...in addition, if I throw a
shortcut into the startup folder it starts...

OK - that rules out my immediate expertise.

Can you enable logging on it?
Does it *produce* any log?

Andrew T.
 
B

Brandon McCombs

JediKnight2 said:
Why would a .jar file not startup if a key was set in
HKLM\Software\Microsoft\Windows\CurrentVersion\Run

The location is correct...I have even tried to convert it into an exe
using Launch4j and it wont start using a registry key..

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.
 
J

JediKnight2

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)
 
J

JediKnight2

JediKnight2 said:
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)

BTW I am no java programmer
 
S

Steven J. Sobol

Why would a .jar file not startup if a key was set in
HKLM\Software\Microsoft\Windows\CurrentVersion\Run

What's in the key? To be safe, you might want to use

%JAVA_HOME%\bin\javaw.exe -jar <path-to-jar>

Just putting the path to the jar might not work.
 
J

jupiter

"Thrown if the Java Virtual Machine cannot find an appropriate
native-language definition of a method declared native. "

Somebody declared a method as native in your code but didn't
fulfill the contract?

You've got a big hurtin' on your Jedi Sword right about now.
 
C

Chris Smith

JediKnight2 said:
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

....

Oh for goodness sake! If you had an error message, why didn't you say
so to begin with? It looks like the problem is with one of two things:
(1) there's a library somewhere that can't be found at that point in
startup (perhaps it's on a network drive, or there's an environment
variable that hasn't been set yet), or (2) this library from beq.ca (Bay
Equities Incorporated?) doesn't work on system startup.

If you're not a programmer, as you later said, then the best thing to do
is probably to contact some kind of technical support with whoever
gave/sold you the program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top