Java file executed in command line but not in browser

  • Thread starter Thread starter msp4422
  • Start date Start date
M

msp4422

I am new to linux and in connecting web pages to the server.

I am working on a project which requires a html page to execute a java file in Linux server and display the output back in a webpage.

I have created a javafile which is executing fine in command line and creates a results.txt file.
I have created a shell script which successfully executes the javafile in it.
A html page where i wrote ajax to trigger a first.php file to execute the above shell script.

Everything is successful when I execute the php file from command line in linux, it displays test print comments in both java and shell script, it creates a file from both java code and shell code.

But when i execute from browser it doesn't execute the java file



Issue - it doesn't execute java code at all so no file creation nor prints statements. It works completely fine when i execute php file from command line

Could you tell me if i have to enable or change settings if i am executing these shell and java code from browser??

I have set the permissions of public_html to 777 for time being.

Code:
Error From browser:Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fcf589ac000, 2555904, 1) failed; error='Permission denied' (errno=13)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid306.log

Continue reading...
 
Back
Top