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

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?
    • 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 ..
  • Can you elaborate as to why you are trying to call the java exe in an installscript??
    • i need to execute some class files during installation of my application...
  • so java is on the machine, all installed and configured, then you have another installation, that requires you to run Java Class files
  • @Badger - I, for one, would be very interested to read your blog on Java 8. So please do get around to writing it !
Please log in to comment

Answers

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.

Answered 01/27/2015 by: Badger
Red Belt

  • 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??
    • 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??
      • 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..!! :)
      • good job on getting it working.
Please log in to comment
Answer this question or Comment on this question for clarity