Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can Apache run Java under Perl?

Status
Not open for further replies.

grimbys

Programmer
Dec 19, 2002
34
0
0
ES
Hi, I have a perl script with this sentence:

...
system "java program_java";
...

My script runs fine on my command line, but when I run it from navigator, with my Apache server and mod_perl active, it won't run fine.

Have I to install Tomcat or Apache Jserver?
What can I do?
Thanks you
 
IF you just want to run the java and get the output of that java you probably need to specify the fully qualified paths like

my $output = system('/usr/local/java2.222/bin/java /home/you/javafiletofun')

That will run the java file specified with the interpreter specified and deliver the output to your perl program. It sounds like perl is not finding the files 'in path'.

To test and see the real error do this :

my $output = system "java program_java";

and view $output. It will have the system level error in it since that is the output of a bad command. I bet it says 'unable to find java' or some such thing.

If you are expecting to, from perl, invoke some complex web UI tomcat java thing your barking up the wrong tree.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top