Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Knowing the full path of the java executable/binary executing the current java program

Thread view: 
Kaiser S. - 12 Jul 2007 11:00 GMT
Hello,

i need to get the full path of the JRE running my program. I thought i
could get the java executable path, but how ?

1/ String.class.getClassLoader() returns null

...

last/ sun specific : the System property "sun.boot.library.path"

Any better way plz ?
Andrew Thompson - 12 Jul 2007 11:56 GMT
...
>i need to get the full path of the JRE running my program.

Why?  What are you trying to achieve?

>Any better way plz ?

Spelling words like 'please' fully, is generally considered
a better way to get people to read and reply to posts,
around here.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Kaiser S. - 12 Jul 2007 14:42 GMT
Andrew Thompson a écrit :
> ..
>> i need to get the full path of the JRE running my program.
>
> Why?  What are you trying to achieve?

it would be long to explain

>> Any better way plz ?
>
> Spelling words like 'please' fully, is generally considered
> a better way to get people to read and reply to posts,
> around here.

anayway, it's the system property "java.home" :D
Lew - 12 Jul 2007 15:18 GMT
> Andrew Thompson a écrit :
>> ..
[quoted text clipped - 10 lines]
>
> anayway, it's the system property "java.home" :D

That's not the path to the executable, but to the Java installation.
Typically the executable is in the bin/ subdirectory of $JAVA_HOME, and also
the jre/bin/ subdirectory.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.