Log in to ZYGOR
Log in with social media
OR
Log in with Zygor account

Announcement

Collapse
No announcement yet.

Windows 10 Clean Install - Java Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Windows 10 Clean Install - Java Error

    I just built a new computer clean install of Windows 10 pro

    Installed Zygor, rebooted

    Error on startup

    Windows cannot find "C:\ProgramData\Oracle\Java\javapath\javaw' Make sure you typed the name correctly and try again

    I can see the cmd window behind it.

    I traced it to the startup.bat folder in the directory
    Users\Username\Appdata\Roaming\Zygor Client Guides

    the bat file hard codes a link to java in the Oracle Directory
    if "%programdata%" == "" GOTO NOPATH

    :PATH
    start "" "%programdata%\Oracle\Java\javapath\javaw" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "C:\Users\Tim\AppData\Roaming\Zygor Guides Client\Zygor.jar" encoded quiet=true
    GOTO END

    :NOPATH
    start "" "C:\Program Files (x86)\Java\jre1.8.0_171\bin\javaw.exe" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "C:\Users\Tim\AppData\Roaming\Zygor Guides Client\Zygor.jar" encoded quiet=true
    GOTO END

    :END


    To fix it I just disabled Zygor from starting at startup and it removed the bat file.

    I looked at my environ var and the path is set to C:\Program Files (x86)\Common Files\Oracle\Java\javapath

    Since whenever you change to start at startup the bat file gets auto generated, is there a path I can add to get it to work?

    #2
    I think that Java may have changed the default path with this latest 171 update. Before that update came out there were no problems with the path pointing to the Program Data folder but since that update with a fresh install of Java it says it can't find the file in Program Data. I'll have our client programmer double check on this and change the .bat file as necessary.
    Become a Fan of Zygor Guides on Facebook:
    http://www.facebook.com/pages/Zygor-...04933799556988

    Follow Zygor Guides on Twitter:
    http://twitter.com/zygorguides

    Comment


      #3
      ZygorCapture.PNG

      There is also an issue if you install Java in a non-default path. I recently installed a small SSD and set it up as a boot disk for improved speed/performance. The only programs installed on the C: SSD are default Windows 10 and WoW. Everything else is installed on a large 7200RPM D: disk. I have created "D:\Program Files" and "D:\Program Files (x86)" and installed 32-bit java on the D: drive under "D:\Program Files (x86)\Java\jre1.8.0_171\bin"

      Although "C:\ProgramData\Oracle\java" exists there is no javapath folder. I tried creating a shortcut called javapath pointed to the correct location of javaw and still no go. I edited Windows environment variables and added "D:\Program Files (x86)\Java\jre1.8.0_171\bin" to %PATH% with no change in behavior. I added new variables %JAVA_HOME% and %JRE_HOME% and still no luck.

      This is what is in my startup.bat

      if "%programdata%" == "" GOTO NOPATH

      :PATH
      start "" "%programdata%\Oracle\Java\javapath\javaw" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "D:\Zygor Guides Client\Zygor.jar" encoded quiet=true
      GOTO END

      :NOPATH
      start "" "D:\Program Files (x86)\Java\jre1.8.0_171\bin\javaw.exe" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "D:\Zygor Guides Client\Zygor.jar" encoded quiet=true
      GOTO END

      :END

      The problem is that %programdata% tests true and runs the :PATH option. Even though there is a :NOPATH option, the batch file never gets there because the :PATH exits to :END before reaching :NOPATH.

      I created and tested the startup.bat below that works, however once ZygorGuidesClient is started it overwrites my startup.bat with the original that does not work.

      if exist %programdata%\Oracle\Java\javapath\ (
      start "" "%programdata%\Oracle\Java\javapath\javaw" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "D:\Zygor Guides Client\Zygor.jar" encoded quiet=true
      ) else (
      start "" "D:\Program Files (x86)\Java\jre1.8.0_171\bin\javaw.exe" -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -jar "D:\Zygor Guides Client\Zygor.jar" encoded quiet=true
      )

      Comment


        #4
        I'll make sure our client programmer sees this so he can fix that .bat file.
        Become a Fan of Zygor Guides on Facebook:
        http://www.facebook.com/pages/Zygor-...04933799556988

        Follow Zygor Guides on Twitter:
        http://twitter.com/zygorguides

        Comment

        Working...
        X