For a varsity project i need to execute a shell command from jsp. Some of my command works. But not all. My system is Linux (Ubuntu distro), Java 1.6 & Glashfish server.
When i try this
The Text editor automatically open.Code:
<% Runtime.getRuntime().exec( "gedit" ); %>
But for this
Nothing happen. The code.cpp didn't complie.Code:
<% Runtime.getRuntime().exec( "g++ code.cpp -o code" ); %>
Whats wrong. What should i do. Please help.