JPCSP start .bat says Java not exist due Windows command issue - Printable Version +- EmuNewz Network (https://www.emunewz.net/forum) +-- Forum: PSP Emulation (https://www.emunewz.net/forum/forumdisplay.php?fid=191) +--- Forum: JPCSP Official Forum (https://www.emunewz.net/forum/forumdisplay.php?fid=51) +---- Forum: General discussion (https://www.emunewz.net/forum/forumdisplay.php?fid=57) +---- Thread: JPCSP start .bat says Java not exist due Windows command issue (/showthread.php?tid=75019) |
JPCSP start .bat says Java not exist due Windows command issue - montcer9012 - 08-08-2012 Some users has been reporting that even they have installed Java 6 or 7 on architect x86/x64 the start JPCSP batch file says that Java is not found or the version is old. It seems that some Windows version does not recognized the "REG" command making those lines becomes useless: Code: for /f "tokens=3* skip=2" %%a in ('reg query "%key%" /v CurrentVersion') do set JAVA_VERSION=%%a This will become a problem to use JPCSP for non middle Windows users. The fastest (But not flawless) solution i found will be set directly where to run: Code: @echo off Instead registry search i suggest verify java.exe location whit something like: Code: FOR %Z IN (java.exe) DO SET JAVA_HOME=%~dpZ For now the best solution to this problem is use hyakki JPCSP Launcher. Cheers. RE: JPCSP start .bat says Java not exist due Windows command issue - gid15 - 08-09-2012 Could someone test if this script would better work? I've tried to detect if the "reg" command is available. Also, if the java command is not returning an error code of 0, a pause is added so that you can see any error message. Code: @echo off RE: JPCSP start .bat says Java not exist due Windows command issue - montcer9012 - 08-09-2012 It will work. If you change: Code: reg /? >NUL Code: ASDF /? >NUL However, certain users install a Java version over older installed versions. I am not sure but i think maybe Windows will do something weird (Start the older Java instead newest?) if several Java versions are installed; this is why "java.exe fix" are not flawless. RE: JPCSP start .bat says Java not exist due Windows command issue - gid15 - 08-09-2012 I've just seen that java.exe has an option to start the 32 or 64 bit version. Could someone try the following on a 64 bit system where both versions are installed: Code: java -d32 -help Edit: this option is only available from Java 7. It is not available on Java 6. RE: JPCSP start .bat says Java not exist due Windows command issue - montcer9012 - 08-09-2012 It works! Here's the result: (I add "Testing -d32/-d64 on each section)" Code: Testing -d32 switch . . . It continue whit more Java commands on spanish, but the deal here was to probe if the switch work and it did. Great! NOTE: I do have installed Java 7u5 x86/x64; not sure if Java -d32 response means that JVM does not work on my OS or it not recognize my installed version. RE: JPCSP start .bat says Java not exist due Windows command issue - gid15 - 08-09-2012 I've updated start-windows-x86.bat in r2682 to try to support systems where the REG command is not available. Only changed for the 32-bit Java for now. Could you test it? RE: JPCSP start .bat says Java not exist due Windows command issue - montcer9012 - 08-09-2012 I can't cause my OS is x64. But let's wait people use this new batch and see what happen. |