I've got a jar file that I must execute using PHP, however when I run the script all I recieve may be the following error: Couldn't reserve enough space for object heap. I've done some searching also it appears as if I get this since the command is not being performed inside a login spend. If this sounds like the situation how do you achieve this? I've attempted both shell_exec() and exec() and both produce exactly the same error.

Just help!

Using professional() would normally work correctly however, inside your situation it appears like Java is not able to allocate enough memory to begin (hence the mistake message). If you are running inside a virtual machine with limited RAM with no swap space, its basically impossible to operate the easiest java programs.

The initial step is to ascertain if java runs whatsoever in your machine. Attempt to just run

java -version

In the event that fails with similar error, you will need to increase the quantity of memory available in some way (eg, purchasing an agenda with increased memory or swap space). If you cannot, you might have the ability to manage should you limit the utmost heap size with -Xmx16m (sets the utmost heap size to 16 mb) as well as less, but for the reason that situation your jar file might not have enough memory to operate!