EmuNewz Network
Reg is not a recognizable command - 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: Hardware infos (https://www.emunewz.net/forum/forumdisplay.php?fid=58)
+---- Thread: Reg is not a recognizable command (/showthread.php?tid=130608)



Reg is not a recognizable command - Zoulik - 02-21-2013

Every time i start up my JPCSP, i get the error that 'reg' is not a recognizable command, and that i need to download a new version of java. I just downloaded java 7 update 15, the most recent java, and it still wont work.


RE: Reg is not a recognizable command - sum2012 - 02-26-2013

To gid15
Can you add a directly check
C:\Progra~1\Java\jre7\bin\Java.exe ?
My freind also have this probrem.


RE: Reg is not a recognizable command - gid15 - 02-27-2013

Would this updated start-windows-x86.bat fix the issue?
Code:
@echo off
rem CD to the path of the command line, this is required when running as an administrator
cd /D "%~dp0"

set PATH=%PATH%;lib\;lib\windows-x86\

if NOT EXIST "%SystemRoot%\SysWOW64" goto JAVA32
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
goto JAVA

:JAVA32
set key=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

:JAVA
set JAVA_CMD=%ProgramFiles%\Java\jre7\bin\java.exe
if not exist "%JAVA_CMD%" set JAVA_CMD=java.exe

rem Checking if the "reg" command is available
reg /? >NUL 2>NUL
if ERRORLEVEL 1 goto RUN

set JAVA_VERSION=
set JAVA_HOME=
for /f "tokens=3* skip=2" %%a in ('reg query "%key%" /v CurrentVersion') do set JAVA_VERSION=%%a
for /f "tokens=2* skip=2" %%a in ('reg query "%key%\%JAVA_VERSION%" /v JavaHome') do set JAVA_HOME=%%b

set JAVA_CMD=%JAVA_HOME%\bin\java.exe
if not exist "%JAVA_CMD%" goto JAVAMISSING

:RUN
echo Running Jpcsp 32bit...
"%JAVA_CMD%" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-x86 -jar bin/jpcsp.jar %*
if ERRORLEVEL 1 goto PAUSE
goto END

:JAVAMISSING
echo The required version of Java has not been installed or isn't recognized.
echo Go to http://java.sun.com to install the 32bit Java JRE.

:PAUSE
pause

:END



RE: Reg is not a recognizable command - sum2012 - 02-27-2013

To gid15
My friend is using win 64 bit.
Can you give me 64 bit modify version ?


RE: Reg is not a recognizable command - sum2012 - 02-28-2013

Something like this not ok ?
Code:
@echo off
if EXIST "C:\PROGRA~1\Java\jre7\bin\java.exe" goto SPECAL_HANDLE
rem CD to the path of the command line, this is required when running as an administrator
cd /D "%~dp0"

set PATH=%PATH%;lib\;lib\windows-x86\

if NOT EXIST "%SystemRoot%\SysWOW64" goto JAVA32
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
goto JAVA

:JAVA32
set key=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

:JAVA
set JAVA_CMD=java.exe

:SPECAL_HANDLE
C:\PROGRA~1\Java\jre7\bin\java.exe -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-x86 -jar bin/jpcsp.jar %*
goto END

rem Checking if the "reg" command is available
reg /? >NUL
if ERRORLEVEL 1 goto RUN

set JAVA_VERSION=
set JAVA_HOME=
for /f "tokens=3* skip=2" %%a in ('reg query "%key%" /v CurrentVersion') do set JAVA_VERSION=%%a
for /f "tokens=2* skip=2" %%a in ('reg query "%key%\%JAVA_VERSION%" /v JavaHome') do set JAVA_HOME=%%b

set JAVA_CMD=%JAVA_HOME%\bin\java.exe
if not exist "%JAVA_CMD%" goto JAVAMISSING

:RUN
echo Running Jpcsp 32bit...
"%JAVA_CMD%" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-x86 -jar bin/jpcsp.jar %*
if ERRORLEVEL 1 goto PAUSE
goto END

:JAVAMISSING
echo The required version of Java has not been installed or isn't recognized.
echo Go to http://java.sun.com to install the 32bit Java JRE.

:PAUSE
pause

:END



RE: Reg is not a recognizable command - gid15 - 03-01-2013

For 64 bit:
Code:
@echo off
rem CD to the path of the command line, this is required when running as an administrator
cd /D "%~dp0"

set PATH=%PATH%;lib\;lib\windows-amd64\

if NOT EXIST "%SystemRoot%\SysWOW64" goto JAVA32

if "%ProgramFiles%" == "%ProgramFiles(x86)%" goto JAVA32SHELL

set JAVA_CMD=%ProgramFiles(x86)%\Java\jre7\bin\java.exe
if not exist "%JAVA_CMD%" set JAVA_CMD=java.exe

rem Checking if the "reg" command is available
reg /? >NUL 2>NUL
if ERRORLEVEL 1 goto RUN

set key=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
set JAVA_VERSION=
set JAVA_HOME=
for /f "tokens=3* skip=2" %%a in ('reg query "%key%" /v CurrentVersion') do set JAVA_VERSION=%%a
for /f "tokens=2* skip=2" %%a in ('reg query "%key%\%JAVA_VERSION%" /v JavaHome') do set JAVA_HOME=%%b

set JAVA_CMD=%JAVA_HOME%\bin\java.exe
if not exist "%JAVA_CMD%" goto JAVAMISSING

:RUN
echo Running Jpcsp 64bit...
"%JAVA_CMD%" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-amd64 -jar bin/jpcsp.jar %*
if ERRORLEVEL 1 goto PAUSE
goto END

:JAVA32
echo Unable to run a 64bit build on a 32bit platform. Install a 64bit version of Windows first.
goto PAUSE

:JAVA32SHELL
echo Unable to properly run a 64bit application from a 32bit context on a 64bit platform.
goto PAUSE

:JAVAMISSING
echo The required version of Java has not been installed.
echo Go to
echo     http://www.oracle.com/technetwork/java/javase/downloads/index.html
echo to install the "Windows x64" Java JRE.

:PAUSE
pause

:END



RE: Reg is not a recognizable command - sum2012 - 03-01-2013

Hope get feed back from my friend
(03-01-2013, 07:40 AM)gid15 Wrote: For 64 bit:



RE: Reg is not a recognizable command - gid15 - 03-01-2013

Changes are now available in r2999.