Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Windows Startup

Reply
Thread Tools

Windows Startup

 
 
JediKnight2
Guest
Posts: n/a
 
      01-20-2007
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..

 
Reply With Quote
 
 
 
 
Chris
Guest
Posts: n/a
 
      01-20-2007
JediKnight2 wrote:
> 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.
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-20-2007
JediKnight2 wrote:
> Why would a .jar file not startup ...


Any number of reasons. Does it work from the command line?

Andrew T.

 
Reply With Quote
 
JediKnight2
Guest
Posts: n/a
 
      01-20-2007
Yup...starts by double clicking as well...in addition, if I throw a
shortcut into the startup folder it starts...



Andrew Thompson wrote:
> JediKnight2 wrote:
> > Why would a .jar file not startup ...

>
> Any number of reasons. Does it work from the command line?
>
> Andrew T.


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-20-2007
JediKnight2 wrote:
> Yup...


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.

 
Reply With Quote
 
Brandon McCombs
Guest
Posts: n/a
 
      01-20-2007
JediKnight2 wrote:
> 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.
 
Reply With Quote
 
JediKnight2
Guest
Posts: n/a
 
      01-20-2007

Brandon McCombs wrote:
> JediKnight2 wrote:
> > 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.


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.testInitial ized(Native Method)
at
ca.beq.util.win32.registry.RegistryKey.initialize( RegistryKey.java:25
6) at ca.beq.util.win32.registry.RootKey.<clinit>(RootKe y.java:8 at
xlinuks.RegistryEditor.hasStartUpEntry(RegistryEdi tor.java:4 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)

 
Reply With Quote
 
JediKnight2
Guest
Posts: n/a
 
      01-20-2007

JediKnight2 wrote:
> Brandon McCombs wrote:
> > JediKnight2 wrote:
> > > 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.

>
> 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.testInitial ized(Native Method)
> at
> ca.beq.util.win32.registry.RegistryKey.initialize( RegistryKey.java:25
> 6) at ca.beq.util.win32.registry.RootKey.<clinit>(RootKe y.java:8 at
> xlinuks.RegistryEditor.hasStartUpEntry(RegistryEdi tor.java:4 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

 
Reply With Quote
 
Steven J. Sobol
Guest
Posts: n/a
 
      01-20-2007
In article <(E-Mail Removed) om>, JediKnight2 wrote:
> 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.


--
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.
 
Reply With Quote
 
jupiter
Guest
Posts: n/a
 
      01-21-2007

"JediKnight2" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
>
> JediKnight2 wrote:
>> Brandon McCombs wrote:
>> > JediKnight2 wrote:

>>
>>
>> java -jar "D:\Program Files\TGDTJ\tgdtj.jar" Exception in thread
>> "main"
>> java.lang.UnsatisfiedLinkError: ca.beq.util.win32.reg
>> istry.RegistryKey.testInitialized()V


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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Tomcat startup issue in Windows Darren.Kukulka@connaught.plc.uk Java 3 04-27-2006 09:41 AM
Windows 98 machine won't access Internet or local shared devices on startup Ture Magnusson Wireless Networking 3 06-21-2005 12:54 PM
Wireless networking and startup performance of Windows XP =?Utf-8?B?SGVsbXV0aCBTbm9laWplbg==?= Wireless Networking 2 12-16-2004 02:35 PM
Tomcat cannot startup via windows form perlrulez Java 2 02-07-2004 03:58 PM
Tomcat cannot startup via windows form perlrulez Java 0 02-06-2004 04:01 AM



Advertisments