LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-22-2004, 11:21 AM   #1
blimbo
LQ Newbie
 
Registered: Jul 2003
Location: London
Distribution: Fedora Core 4
Posts: 16

Rep: Reputation: 0
Probs running .jar file via CGI script under Apache


Hi everyone,

I have a Perl CGI script running under Apache that runs a Java .jar file. The program is called Haploview and basically takes a few input files, does some calculations then produces a few output files.

The command the CGI script uses to run works fine when I cut and paste it onto the command line but fails when done from the script, with the following error:

#/userdata/home/tim/j2re1.4.2_05/bin/java -jar /userdata/home/tim/applications/haploview/Haploview.jar -n -p /tmp/ENSG00000017427.ped --skipcheck -i /tmp/ENSG00000017427.info -o SFS --dprime -m 500

#Error occurred during initialization of VM java.lang.Error: Properties init:
Could not determine current working directory.

I've googled for this but the only hints were to do with permissions, so I've set pretty much everything to 777. I've tried putting the .jar in different places including the Java bin folder but no joy. Btw I know very little about Java, but my Perl and Apache are ok, & running Solaris Sparc SUNW,Ultra-4.

Cheers!

Tim
 
Old 07-22-2004, 11:29 AM   #2
SheldonPlankton
Member
 
Registered: Jun 2004
Posts: 129

Rep: Reputation: 15
WAG, I would suspect that a class in your jar file is a servlet. Servlets can get initialization data from "property files" in a method call init(). You might want to check if you jar contains a servlet(s).
You might want to check out http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running a ..jar file under Mandrake 10.0 official Jamel75 Linux - Software 5 09-07-2004 01:48 PM
Apache cgi-script problem palanisaravanan Linux - General 6 02-07-2004 10:41 AM
Apache CGI Problem : Browser not running script Zaknafien Linux - Software 3 12-31-2003 02:16 PM
cgi running on apache foop37 Linux - Newbie 1 08-06-2003 10:34 AM
Running a shell script via CGI-BIN chrisk5527 Linux - General 3 05-09-2003 12:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration