Solved

Question about executing jar file from PHP

Posted on 2011-03-09
2
560 Views
Last Modified: 2013-12-06
I have a file test.php that looks like

<html>
      <head>
        <link rel="stylesheet" type="text/css" href="mystyle.css" />
        <title>Demographics</title>

        </head>

<body>

<?php
$Env = shell_exec('. /home/content/xxx/html/java_env');
$Name = shell_exec('/home/content/xxx/html/jdk1.6.0_24/bin/java -version');
echo "<pre>$Env</pre>";
echo "<pre>$Name</pre>";

?>
</body>
</html>

This is causing the following error

Error occurred during initialization of VM
Could not reserve space for ObjectStartArray

------------------------------------------------

On the command line in an ssh session I am able to execute this code

java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

just fine. I have added flags
-Xms2m -Xmx16m -XX:ReservedCodeCacheSize=32m -XX:MaxPermSize=64m and all others sorts of options but I am getting the same error. All other system commands on linux box excute just fine

I have ready that the tomcat webserver JVM needs to be modified but I am unsure where to do this. The GoDaddy stuff says the problem is with my code. Can anyone shed light on this
0
Comment
Question by:shariq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
shariq earned 0 total points
ID: 35112503
I was able to get this issue resolved by using

java  -Xms16m -Xmx32m and none of the other options

Thanks

Shariq
0
 

Author Closing Comment

by:shariq
ID: 35112516
Problem solved by bumping up the xms option. Also go daddy tech support says that shared hosting environment does not support the creation of JVM. This is not correct
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP question(s) about order of output 9 75
Recieving large files from China 4 159
VMware machine is not booting 6 122
unix shell script 4 39
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question