EmuNewz Network

Full Version: Unable to launch JPCSP from command prompt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I created a custom front end for all of my emulators, but suffice to say I just need to run a PSP iso from a command line. I have tried the recommendation here: http://www.emunewz.net/forum/showthread.php?tid=87597
But I get the error "Unable to create the Java Virtual machine."

All I need to do is run the iso from a command prompt.

Here is the command I am trying (perhaps it is a simple mistype?

"c:\program files\java\jre7\bin\java" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:reservedCodeCacheSize=64m -Djava.library.path=g:/emulation/jcpsp/lib/windows-amd64 -jar g:/emulation/jpcsp/bin/jpcsp.jar -u g:/emulation/jpcsp/images/hexyz force.iso[/align]

Any help?

Thanks in advance!
It seems that Java arguments must be on the exact way they are; to fix the issue you must replace one lower case letter by uppercase. The mistake is on "-reservedCodeCacheSize":
Quote:"c:\program files\java\jre7\bin\java" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:reservedCodeCacheSize=64m -Djava.library.path=g:/emulation/jcpsp/lib/windows-amd64 -jar g:/emulation/jpcsp/bin/jpcsp.jar -u g:/emulation/jpcsp/images/hexyz force.iso

Anyway, once it is replaced by "R" JPCSP will start but the full patches are not allowed on next commands so you must place the batch file inside "g:/emulation/jpcsp/" instead place the full patch on the arguments; if you want it on Desktop or somewhere else create a shortcut; besides, it will allow you change the icon. The working command look like this:
Quote:"c:\program files\java\jre7\bin\java" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-amd64 -jar bin/jpcsp.jar -u "images/hexyz force.iso"

Remember to add -r at the end if you want JPCSP load the game image once is started.

EDIT: Some users add optional Java arguments that need administrator privileges on Windows Vista/7/8; to properly start JPCSP like administrator, must add to the batch "CD /D "%~DP0"" after the "@ECHO OFF" on the very begging. More info here: http://www.emunewz.net/forum/showthread.php?tid=87454
Thanks montcer9012!

I will try this out and let you know how it goes. I appreciate the quick reply!

I am on Windows XP so Run as Admin is not an issue for now (although I will move to Win 7 shortly). Here is my new command line:

@echo off
set PATH=%PATH%;lib\;lib\windows-x86\

echo Running Jpcsp 32bit...

"c:\program files\java\jre7\bin\java" -Xmx1024m -Xss2m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-amd64 -jar bin/jpcsp.jar -u umdimages/cube.iso -r
GOTO END

:END
Pause

I now get this error(s):
[Image: 357hfsp.png]

Any ideas?
It is saying that D.library.patch have a mistake; check it. I am not on a computer right now so i will assist you later.
However, a first look make me thing that you are trying to run a x64 patch when you have a x86 files. Change the patch like it is named.
Code:
-Djava.library.path=lib/windows-amd64
should be
Code:
-Djava.library.path=lib/windows-x86
since haddockd is using Windows XP 32-bit. Also make sure that folder exists in the JPCSP folder.
Thanks Itaru,

That worked! It says my game is encrypted. I must have dumped it incorrectly...

Thoughts?
.cso images are just an compressed .iso. If the game's name have spaces ensure that the full patch are quoted. E.g: "images/Spaced name.cso". Also, ensure that the game is on the patch that you are using.

EDIT: JPCSP can handle encrypted games; however, maybe yours is different, don't know. Anyway, could try toggling on/off the Crypto options.
[attachment=10837]
(11-09-2012, 04:48 PM)haddockd Wrote: [ -> ]Thanks Itaru,

That worked! It says my game is encrypted. I must have dumped it incorrectly...

Thoughts?

You must be using a very old revision of JPCSP. Download the latest from http://buildbot.orphis.net/jpcsp/