/build/static/layout/Breadcrumb_cap_w.png

why java.exe is removed from c:\windows\system32 in jre 8?

I know new environment variable(C:\ProgramData\Oracle\Java\javapath) is added now in PATH.So java.exe should be available everywhere.
But somehow,in installshield 2012 installscript language,when i try to call java.exe in launchappandwait function,its not able to find at C:\ProgramData\Oracle\Java\javapath location.If i manually copy java.exe in system32,then it worked...!!!
So,if i manually change the java msi for placing java.exe in system32,will it effect the system or other application in any way??
or some alternative solution so that launchappandwait should read C:\ProgramData\Oracle\Java\javapath by default?

4 Comments   [ + ] Show comments
  • Has the PATH environment variable been updated correctly? Has the SYSTEM or the USER path been updated?
    Has the machine been rebooted after updating the PATH env. variable? If the PATH var is correctly updated, is the new path added to the end of the current path, or to the beginning? Are there any other instances of java.exe in the existing paths? What account is "launchappandwait" running under? - EdT 9 years ago
    • SYSTEM path has been updated..and i dont think reboot is required as i have used sendmessagetimeout function and i have checked during installation that PATH variable is updated in cmd,registry .. - vivekjazzwal 9 years ago
  • Can you elaborate as to why you are trying to call the java exe in an installscript?? - Badger 9 years ago
    • i need to execute some class files during installation of my application... - vivekjazzwal 9 years ago
  • so java is on the machine, all installed and configured, then you have another installation, that requires you to run Java Class files - Badger 9 years ago
  • @Badger - I, for one, would be very interested to read your blog on Java 8. So please do get around to writing it ! - EdT 9 years ago

Answers (1)

Posted by: Badger 9 years ago
Red Belt
1

Leave it all as it is.

I was going to write a blog about this and changes that Java have made, specifically around the fact that now the java.exe is no longer in the system folder. But you can call  java from a CMD because it adds its location, as you have pointed out into the path statement (C:\Programdata\Oracle\Java\javapath).

Are you trying to run a CA during the java install??
If you are you might need to get your timings right. Since the wonderful Java MSI 'isn't', its just a bunch of CAs, you will need to wait until the install has actually finished, then written the change to the Path statement, and then you can call java 'from anywhere'. The reason it works if you copy the java.exe into the System folder is that it is already loaded into the path statement.


Comments:
  • actually java is prerequistite of application and during installation ,java is used to execute class files..
    and during intallation ,i checked already that path variable is updated with "c:\programdata\Oracle\Java\javapath" in registry ,command prompt and in environment variable.
    Is this because of syslinks instead of actual java.exe in above path?? - vivekjazzwal 9 years ago
    • so before you do your new install, "java" can be launched from the CMD?? Have you definitely got all the correct arguments for the calling the class files?? back slashes and quotes, as its in a new location now?? - Badger 9 years ago
      • yes java get launched from cmd...
        don't know what is the issue bt got one workaround..im my installer,all class files were placed in supportdir,so i just placed copy of java .exe in same folder into installer..and its worked..!!
        others workarounds were if i place java.exe in system32 but its removed in java8 for some reason.So dont want to take risk..
        btw thanks for the digging in into my issue..!! :) - vivekjazzwal 9 years ago
      • good job on getting it working. - Badger 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ