The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trying run a java app but have java issue

Discussion in 'General Discussion' started by TJCooper, Mar 17, 2004.

  1. TJCooper

    TJCooper Member

    Joined:
    Sep 21, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    St. Louis, MO
    I am try to run this command (some fields changed for privacy) in ssh to start it

    Code:
    cd /home/USERNAME/;nohup /usr/bin/j2sdk1.4.2_03/bin/java -jar jwwim_server_sql2.jar 127.0.0.1 USERNAME_DATABASENAME USERNAME_DATABASEUSERNAME DATABASEPASS PORTNUMBER
    I can run it with no problems as root but get this error if i run as the user

    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Any ideas???

    I also tried putting the java installation in the users folder and still no luck..
     
  2. jnagro

    jnagro Active Member

    Joined:
    Jun 28, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    same issue here... someone please post info...
     
  3. jnagro

    jnagro Active Member

    Joined:
    Jun 28, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Problem Found

    java needs a lot of system resources, cpanel puts some ulimit restrictions in /etc/bashrc to limit normal users... with these default ulimit settings java uses more than its share and gets killed... if you comment out those lines and re-login you will be able to run it... i am currently looking for correct ulimit settings soi you can still limit users to some degree and let them use java... i will post those later...
     
  4. TJCooper

    TJCooper Member

    Joined:
    Sep 21, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    St. Louis, MO
    instead of editing /etc/bashrc I added this to the command -Xmx48M like here below...

    Code:
    cd /home/USERNAME/;
    nohup /usr/bin/j2sdk1.4.2_03/bin/java -Xmx48M -jar jwwim_server_sql2.jar 127.0.0.1 USERNAME_DATABASENAME USERNAME_DATABASEUSERNAME DATABASEPASS PORTNUMBER
     
Loading...

Share This Page