Find the installation Path of the current running VM on Windows

Hello,
I have a java class started by webstart.
In this class I would like to find the absolute path of the current running vm? This is important to me because I need to start an exe file (using ProcessBuilder) and hand it the path of the java VM,
For example I could try something like this:
private static File findJDK() throws Exception {
String s = System.getProperty("java.home");
File myJRE = new File(s);
if (new File(myJRE, "bin/javac.exe").isFile()) {
return myJRE;
File parent = myJRE.getParentFile();
if (new File(parent, "bin/javac.exe").isFile()) {
return parent;
for (String pathel : System.getenv("PATH").split(File.pathSeparator)) {
File bindir = new File(pathel);
if (new File(bindir, "javac.exe").isFile()) {
return bindir.getParentFile();
return myJRE;
But I would like the above code to be more fool proof!
For example the "java.home" could be wrongly set.
Since java is allready running I would have hopped that I could query the Runtime. But there seems to be no method providing the running java VM path?
I also tried looking at the jnlp services API but no luck.
I would be also interested find the lastest java VM on the client Windows machine....
Many greetings
john

http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getProperties()
bye
TPD

Similar Messages

  • Find the installation path of the addon

    Hi
    Can anyone tell me a way to find out the installation path of the current addon please.
    I would like to reference the xml files that are in there in my application
    I am using SP01 PL36
    Many thanks
    Regards Andy

    Paul,
    application is part from
    using System.Windows.Forms;
    so when you include the line above it is working !
    are you not using c# ?
    tell me your programming language - i try to help you.
    debug the line in c# and you will see you have the path with your xml
    xmlineed = System.IO.Directory.GetParent(Application.ExecutablePath).ToString() + ";
    myfile.xml"
    replace the ; to double \
    if you're satisfied reward me

  • How i can define the installation path of the setup.msi installation file ?

    Hi everybody,
    The msi package generated during AIR app install is  in a temporary folder ..../User/Username/Local/Temp/fla%.tmp/setup.msi.
    My problem is the installation folder is always changing.
    how can i define this folder in order to grant elevated access for users to install this package ?

    up

  • Find installation path of the LV application

    I want to find the installation path of the LV application. I have aplication already installed in the system. Lets call it applic.exe file. I want to find in which directory it is installed. I need to obtain this information programatically, probably by reading some registry key, but I do not know which.
    Thanks in advance.
    regards
    Pawel

    Hi pawel
    1. Registry: I don´t think that will be possible, since, at least in my system, there is no registry key for path to an application.exe. Yoy can try to run Regedit ans use its search to look for youa applic.exe and see all references in registry.
    2. My suggestion is to use any list recursive directories and check for path to your file.
    You can find examples if listing directories in this web and OpenG site.
    Hope it helps
    Alipio
    "Qod natura non dat, Salmantica non praestat"

  • How can I change the installation path  of JWS?

    I have to install the JRE 1.4.0_01 in silent mode on Windows XP. For the JRE I can set the installation path in the corresponding dialog and record it in an *.iss file. When starting the silent installation the JRE is correctly installed into this path but the Java Webstart installation procedure doesn't care about this path and installs JWS in 'D:\Programme\Java Web Start'.
    How can I change the installation path for JWS?
    J�rg

    Verify Free Disk Space. Assuming you are installing the OS to the C: drive.

  • I need to reinstall my Canon Pixma Pro 9500 MK 2 printer on my iMac running Mavericks. It looks for software but Apple cannot find. The driver is available on my computer. Is there a way I can force the installer to use the available driver?

    I need to reinstall my Canon Pixma Pro 9500 MK 2 printer on my iMac running Mavericks. It looks for software but Apple cannot find. The driver is available on my computer. Is there a way I can force the installer to use the available driver?

    I need to reinstall my Canon Pixma Pro 9500 MK 2 printer on my iMac running Mavericks. It looks for software but Apple cannot find. The driver is available on my computer. Is there a way I can force the installer to use the available driver?

  • How to get the trace file name for current running application?

    Hi, I want to know if it is possible to get the file name directly for current running application instance which is launched by javaws.
    There is a property "deployment.user.logdir" tells the log directory, it would be great if a file name property
    is available. something like "instance.trace.file".
    Our application wants it because we would like our client send use the application log by clicking a "send error"
    button, the codes finds the trace file and compress it and send it by using a smtp server.
    In 1.5, we can do it by using a shell program.

    I found other asked it before, but I tried to set both properties, but neither works. my sun JRE version :java version "1.6.0_04"
    <property
    name="deployment.javaws.traceFileName"
    value="abcfefsfdsf"/>
    <property
    name="deployment.javapi.trace.filename"
    value="235235235"/>
    But it always write to one trace file with name lik javaws63645.trace

  • HT1926 My iTunes installer was interrupted & now it's telling me "Your system has not been modified.  To complete these operations at a later time, please run the installer again". The only problem is, I've tried to run it about six or seven times.  Can s

    My iTunes installer was interrupted &amp; now it's telling me "Your system has not been modified.  To complete these operations at a later time, please run the installer again". The only problem is, I've tried to run it about six or seven times.

    I'm not sure anyone here knows more about the Java plugin than you do...
    Were you starting the control panel from disk as administrator because it didn't work starting it through the Start menu (if you have Control Panel set to View by Category, the Java control panel is under "Programs").

  • How to find the physical path of the ASM disks?

    I am in a dilemma on how to find out the physical path of the ASM disks. I tried the following query, but as you can see it is not providing me the physical path of the LUN. This is a 2 node 10.2.0.4 RAC Cluster using asmlib package.
    col name format a20
    col path format a20
    col label format a20
    select name, path, label from v$asm_disk;
    NAME PATH LABEL
    ORCL:ASM103 ASM103
    ORCL:ASM104 ASM104
    ORCL:ASM117 ASM117
    ASM101 ORCL:ASM101 ASM101
    ASM102 ORCL:ASM102 ASM102
    ASM105 ORCL:ASM105 ASM105
    ASM106 ORCL:ASM106 ASM106
    ASM107 ORCL:ASM107 ASM107
    ASM108 ORCL:ASM108 ASM108
    ASM109 ORCL:ASM109 ASM109
    ASM110 ORCL:ASM110 ASM110
    NAME PATH LABEL
    ASM111 ORCL:ASM111 ASM111
    ASM112 ORCL:ASM112 ASM112
    ASM113 ORCL:ASM113 ASM113
    ASM114 ORCL:ASM114 ASM114
    ASM115 ORCL:ASM115 ASM115
    ASM118 ORCL:ASM118 ASM118
    ASM119 ORCL:ASM119 ASM119
    ASM120 ORCL:ASM120 ASM120
    ASM121 ORCL:ASM121 ASM121
    ASM122 ORCL:ASM122 ASM122
    ASM123 ORCL:ASM123 ASM123
    NAME PATH LABEL
    ASM124 ORCL:ASM124 ASM124
    ASM125 ORCL:ASM125 ASM125
    ASM126 ORCL:ASM126 ASM126
    ASM127 ORCL:ASM127 ASM127
    ASM302 ORCL:ASM302 ASM302
    ASM303 ORCL:ASM303 ASM303
    ASM304 ORCL:ASM304 ASM304
    ASM305 ORCL:ASM305 ASM305
    ASM306 ORCL:ASM306 ASM306
    ASM307 ORCL:ASM307 ASM307
    32 rows selected.
    Any help will be appreciated.
    --MM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hi
    use the following linux command as root:
    $oracleasm listdisks
    hth

  • The installer you have invoked can run only in solaris_sparc platform.

    Hello,
    I receive the following error when i try and install Solaris Cluster:
    -bash-3.00# uname -a
    SunOS Sun-280R-10 5.10 Generic_137111-05 sun4u sparc SUNW,Sun-Fire-280R
    -bash-3.00# cd /cdrom/solaris_cluster/solaris_sparc/
    -bash-3.00# ./installer
    The installer you have invoked can run only in solaris_sparc platform. Please invoke the installer for Solaris_sparc platform.
    Any idea's on what may be causing this?

    Only one observation, you cite
    -bash-3.00# cd /cdrom/solaris_cluster/solaris_sparc/Note the capitalization of the "solaris_sparc" directory. Is that an offical media kit, or did you burn the CD/DVD yourself?
    I belief the directory should be called "Solaris_sparc" (note the capital S).
    Greets
    Thorsten

  • Can't run the Installation Software for the LiDe 210, need a signed/verified copy???

    Can't run the Installation Software for the LiDe 210, need a signed/verified copy???

    Hi lanepoor!
    So that the Community can help you better, we will need to know the Computer Operating System you're using (Windows XP/Vista/7/8 or Mac 10.x). Any other details you'd like to give will only help the Community better understand your issue! Thanks and have a great day!

  • I'm currently using Lightroom 5.3 and I'm constantly being told to update to 5.5. The download is over 900 Mb but only about a third of that downloads. I have plenty of space on my SSD. Each time I try to complete the installation I get the message 'A pro

    I'm currently using Lightroom 5.3 and I'm constantly being told to update to 5.5. The download is over 900 Mb but only about a third of that downloads. I have plenty of space on my SSD. Each time I try to complete the installation I get the message 'A problem occurred while extracting the archive. Please try downloading the Photoshop Lightroom 5.5 Installer again.' What am I doing wrong?

    use a different browser and download from here,
    Product updates

  • Why do I get the message "The installer requires admin priviledges to run" when trying to install from a DVD?

    I am trying to install software from a DVD on my Mac Mini, When I click on the installer I get the message "The installer requires admin priviledges to run." I have admin priviledges when I look at the account info in Sytem Preferences. ANyone have an idea what to do about this?

    It's a defective installer. If it needs elevated privileges to run, it should prompt for an administrator password. Since the installer is defective, you can assume that whatever it installs -- or would install, if it worked -- is also defective.

  • How do we find out the file path which the IDOC is stored.

    Hi,
    If we use T-code: AL11, we can see the file path of the Unix server.  And some IDOC outbound file is also stored in some file path after generated.
    If i generated an outbound IDOC, how do i know in which file path it stored??
    Thanks

    Hi,
    Go to control record of the outbound IDOC.
    go to partner tab, check the port under sender information.
    the outbound file path will be configured with your port.
    Use T-code WE21, the concerned port will be available under section 'File'
    Directory under tab Outbound file will show the path under which file has been stored.

  • "File Dialog" Express VI returns the wrong path when the user selects the desktop

    In labview 8.0.1 with Windows
    XP, the File Dialog Express VI seems to return something other than the path
    selected by the user when configured to browse for folders (or files and
    folders) and the user selects the desktop.
    I can't determine exactly when it works and when it fails, but it always seems
    to fail if the user selects the desktop from the places bar (the shortcuts on
    the left side of the dialog) or from the drop-down menu at the top of the
    dialog and then clicks the "Current Folder" button to dismiss the
    dialog.  In this case it always returns whatever path is wired to the
    "Start Path" terminal.
    If the user navigates to the desktop with the "Up One Level" button
    or by selecting the actual desktop directory under Documents and Settings, the
    correct path is returned.
    If the user selects a file before clicking the desktop icon, then clicks
    "Current Folder" the correct path is returned.
    If the user clicks the desktop icon, clicks open, then clicks "Current
    Folder" the correct path is returned.
    It's possible to work around this bug in most cases by setting the start path
    to the desktop.
    Has anyone seen this behavior before?
    Can anybody verify this behavior by running the attached VI?
    In the past, when I've reported issues like this I've received responses from
    NI engineers that basically said "Thanks, but we already knew
    that".  Is there anywhere that users can search the list of known
    bugs and avoid wasting time tracking down issues that are already understood by
    NI?
    Thanks,
    Adam Brewster
    Attachments:
    File Dialog Test.vi ‏39 KB

    I'm on 8.2 and I can't get it to fail no matter how I select the desktop. I haven't tried it in 8.0, but I imagine that if this really is a bug, they did know about it and fixed it with 8.2. If this causes a real problem for you, I would suggest upgrading if you can.

Maybe you are looking for