BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How does native exe find java.exe

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment
View previous topic :: View next topic  
Author Message
Steve
Guest





PostPosted: Fri Nov 04, 2005 1:35 pm    Post subject: How does native exe find java.exe Reply with quote




I built a native executable using JBuilder X. Later I upgraded to JBuilder 2006 and uninstalled JBuilder X. I tried executing the .exe I built with JBuilder X and got a dialog saying it couldn't find the java runtime. C:BorlandJBuilder2006jdk1.5bin is in my path, but the runtime from JBuilderX is not anymore. How does the native executable go about finding java.exe (or javaw.exe)?
Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Fri Nov 04, 2005 2:37 pm    Post subject: Re: How does native exe find java.exe Reply with quote



Steve wrote:

Quote:

I built a native executable using JBuilder X. Later I upgraded to
JBuilder 2006 and uninstalled JBuilder X. I tried executing the .exe I
built with JBuilder X and got a dialog saying it couldn't find the java
runtime. C:BorlandJBuilder2006jdk1.5bin is in my path, but the
runtime from JBuilderX is not anymore. How does the native executable go
about finding java.exe (or javaw.exe)?

I believe it looks under "HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava
Runtime Environment" in the registry. Check out that registry entry and
make sure it's properly set up. If it isn't, reinstall JBuilder or
install a JRE from Sun's web site to get it properly configured.

You can also tweak it manually if you're confident enough.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html

Back to top
Steve
Guest





PostPosted: Fri Nov 04, 2005 3:15 pm    Post subject: Re: How does native exe find java.exe Reply with quote




"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> wrote:
Quote:
Steve wrote:


I built a native executable using JBuilder X. Later I upgraded to
JBuilder 2006 and uninstalled JBuilder X. I tried executing the .exe I
built with JBuilder X and got a dialog saying it couldn't find the java
runtime. C:BorlandJBuilder2006jdk1.5bin is in my path, but the
runtime from JBuilderX is not anymore. How does the native executable go
about finding java.exe (or javaw.exe)?

I believe it looks under "HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava
Runtime Environment" in the registry. Check out that registry entry and
make sure it's properly set up. If it isn't, reinstall JBuilder or
install a JRE from Sun's web site to get it properly configured.

You can also tweak it manually if you're confident enough.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/


Interesting. Do you have a feel for if that's the standard way packages find the runtime versus just expecting it to be in the path? I didn't even know the runtime put that key in HKLM. I just check and it looks like JBuilder 2006 didn't put an entry in there for the jdk 1.5 that it uses.

I've been looking at 3rd party "wrappers" that will wrap your executable jar in an exe and they all say they'll "look for" a java runtime and inform the user if one can't be found.
Thanks.
Steve


Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Sat Nov 05, 2005 12:58 am    Post subject: Re: How does native exe find java.exe Reply with quote

Steve wrote:

Quote:
Interesting. Do you have a feel for if that's the standard way packages
find the runtime versus just expecting it to be in the path? I didn't
even know the runtime put that key in HKLM. I just check and it looks
like JBuilder 2006 didn't put an entry in there for the jdk 1.5 that it
uses.

I've been looking at 3rd party "wrappers" that will wrap your executable
jar in an exe and they all say they'll "look for" a java runtime and
inform the user if one can't be found.

As far as I know, that's the standard Windows way of location the Java
runtime.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html

Back to top
Lori M Olson [TeamB]
Guest





PostPosted: Sat Nov 05, 2005 4:49 pm    Post subject: Re: How does native exe find java.exe Reply with quote

Kevin Dean [TeamB] wrote:
Quote:
Steve wrote:

Interesting. Do you have a feel for if that's the standard way
packages find the runtime versus just expecting it to be in the path?
I didn't even know the runtime put that key in HKLM. I just check and
it looks like JBuilder 2006 didn't put an entry in there for the jdk
1.5 that it uses.

I've been looking at 3rd party "wrappers" that will wrap your
executable jar in an exe and they all say they'll "look for" a java
runtime and inform the user if one can't be found.


As far as I know, that's the standard Windows way of location the Java
runtime.


Yes, my personal favorite pet peeve.

When a JDK or JRE is installed on Windows, you get "stubs" for java.exe
and javaw.exe that are placed into the windowssystem32 directory.
These tend to be at the beginning of your path, so they always "win".

These stubs go and dig in the registry to see what that HKLM key is
pointed to, and then they use that.

Problem is, I've seen all too many cases where those stubs and the
registry keys get out of sync, and then the stubs barf with some weird
versioning error, and you end up having to reinstall your JDK/JRE to fix it.

--

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.