Cannot create Java Virtual Machine... STILL!

General discussion about PS3 Media Server (no support or requests)

Cannot create Java Virtual Machine... STILL!

Postby ElimGarak » Tue Mar 03, 2009 1:11 pm

Hi!
I'm having this problem since version 1.03, as already reported.
Everytime I try to open Ps3 using its .exe, I receive a "Cannot create Java Virtual Machine" error.

I've found a workaround, limiting wrapper.java.maxmemory to 704 in wrapper.conf and lanching wrapper.exe instead of the .exe.
Anyway, this is annoying because I am forced to have DOS window with Wrapper running active.

I have 2GB of Ram, so I do not think that is the problem. By the way, even further downsizing memory in wrapper.conf, there's no way to make the .exe work.

Thank you for your support!
ElimGarak
 
Posts: 38
Joined: Mon Jan 19, 2009 10:54 am

Re: Cannot create Java Virtual Machine... STILL!

Postby Konceptz » Tue Mar 03, 2009 4:34 pm

are you using the latest version of Java? http://www.java.com
Konceptz
 
Posts: 46
Joined: Sun Feb 01, 2009 8:19 am

Re: Cannot create Java Virtual Machine... STILL!

Postby shagrath » Tue Mar 03, 2009 6:34 pm

launch this from a command shell in the pms folder:

Code: Select all
javaw -Xmx768M -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar net.pms.PMS



and play with the Xmx parameter: 640, 512 , and so on..
shagrath
Project Lead
 
Posts: 2667
Joined: Wed Jan 14, 2009 1:39 pm

Re: Cannot create Java Virtual Machine... STILL!

Postby ElimGarak » Wed Mar 04, 2009 12:30 pm

Cool, thanks!
I've created a .BAT file with the string and now I use it to launch PSM. Thanks again!!!
ElimGarak
 
Posts: 38
Joined: Mon Jan 19, 2009 10:54 am

Re: Cannot create Java Virtual Machine... STILL!

Postby Hocus » Sat Mar 07, 2009 10:57 am

Hi I'm new to the ps3 media server, and I must admit when I first ran it it worked fantastic, but I am also having the same problem when launching psm (works only with wrapper.exe but has the dos screen). Forgive me, but I have looked everywhere in the psm folder to do as you said, but I have no clue. Still a newbie I'm afraid.

If anyone could help that would be great.

Cheers
Hocus
 
Posts: 2
Joined: Sat Mar 07, 2009 10:53 am

Re: Cannot create Java Virtual Machine... STILL!

Postby whome » Sat Mar 07, 2009 1:38 pm

Create and use this .bat script. start is Windows util to run applications with it and javaw.exe you don't have dos consoles laying around.

PMS.bat
Code: Select all
@REM http://java.sun.com/docs/hotspot/ism.html
@REM
@REM Use java.exe or javaw.exe launcher,
@REM you may give a fully qualified path (c:\jdk1.6\bin\java.exe)
@REM
@REM maximum total heap size: -Xmx<768m | 1g>
@REM

@rem java.exe -Xmx1g -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar
start javaw.exe -Xmx768m -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar

@REM pause
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Cannot create Java Virtual Machine... STILL!

Postby Martin Smith » Wed Mar 11, 2009 6:19 am

Hi again tried all the solutions given always get Can't find jarfile pms.jar

I have put bat file from above intoPs3 folder as PMS.bat but still no improvement.I have looked for a download of the original Runtime Environment,SE v1.4.2_05 file but cannot find it There are several threads on this issue,mine worked almost perfect until the java update

No mater how I configure my startup I still get Unable to find Jarfile pms.jar

If I knew the contents I could recreate one.Does anyone have one I could copy?


Any ideas would be great
Thx
Martin Smith
Martin Smith
 
Posts: 16
Joined: Sun Feb 01, 2009 5:27 am

Re: Cannot create Java Virtual Machine... STILL!

Postby whome » Wed Mar 11, 2009 10:22 am

Can't find pms.jar, well thats a one good problem. Means you don't have PS3MediaServer at all :-)

1) Locate PMS folder
Run search in a PMS installation folder, you should see pms.jar in an installation folder. Put PMS_custom.bat into the same folder. Or better, just run full search on harddrive to locate it.
{ps3ms}/PMS_custom.bat <- put this here right next to pms.jar
{ps3ms}/pms.jar
{ps3ms}/PMS.exe
etc...

2) Locate most up to date Java folder
Default installation is c:/program files/Java/* folder. Look at the folder you should see jre* and/or jdk* something subfolders.

3) Use an explicit java.exe/javaw.exe reference in a PMS_custom.bat
Edit bat script to use an explicit folder reference. See an example here, uncomment last pause line to see possibe dos error messages (executable not found etc..). See how we must give an empty "" 1st parameter to start utility, its how it works.

Code: Select all
@REM http://java.sun.com/docs/hotspot/ism.html
@REM
@REM Use java.exe or javaw.exe launcher,
@REM you may give a fully qualified path (c:\jdk1.6\bin\java.exe)
@REM
@REM maximum total heap size: -Xmx<768m | 1g>
@REM

@rem java.exe -Xmx1g -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar
@rem start javaw.exe -Xmx384m -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar

"C:\Program Files\Java\jre6\bin\java.exe" -version
start "" "C:\Program Files\Java\jre6\bin\javaw.exe" -Xmx768m -Djava.net.preferIPv4Stack=true -Djava.encoding=UTF-8 -jar pms.jar

@REM pause


edit: changed PMS.bat to PMS_custom.bat. PMS source version now has PMS.bat template script to taylor our own needs.
Last edited by whome on Wed Mar 11, 2009 1:15 pm, edited 2 times in total.
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Re: Cannot create Java Virtual Machine... STILL!

Postby ElimGarak » Wed Mar 11, 2009 12:30 pm

Martin Smith wrote:Hi again tried all the solutions given always get Can't find jarfile pms.jar

I have put bat file from above intoPs3 folder as PMS.bat but still no improvement.I have looked for a download of the original Runtime Environment,SE v1.4.2_05 file but cannot find it There are several threads on this issue,mine worked almost perfect until the java update

No mater how I configure my startup I still get Unable to find Jarfile pms.jar

If I knew the contents I could recreate one.Does anyone have one I could copy?


Any ideas would be great
Thx
Martin Smith


Try to use the same .bat, but change this value
-Xmx768m
to
-Xmx704m

If it doesn't work, keep trying lowering each time by 16 (688-672-656, etc.)
ElimGarak
 
Posts: 38
Joined: Mon Jan 19, 2009 10:54 am

Re: Cannot create Java Virtual Machine... STILL!

Postby whome » Wed Mar 11, 2009 12:47 pm

Note to PMS.bat script file. I just took a version control update. Project now has PMS.bat script to help people taylor an application startup.

I suggest everyone makes copypaste/rename PMS_custom.bat or similar. This way you don't lose own custom script next time update an installation folder. Consider PMS.bat as an example template script. My few posts up an example where you can give an explicit java path, make it to your own copy of batch script. Explicit java path help you lock PMS to a given jvm version if your system-wide default is not one to use.
whome
 
Posts: 113
Joined: Tue Jan 20, 2009 12:26 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests