0

I'm trying to allow apache and PHP to execute a script I have written that is located in /usr/local/lib

the script in question is called "pathy" has been added to the path in my .profile, and I can execute it from anywhere. The script is just to simplify the launching of a java program and contains:

#!/bin/sh

java Pathy $*

php returns sh: 1: pathy: not found when i call pathy test.pathy with the backtick operator. If i fully type the name /usr/local/lib/pathy test.pathy it works and runs the script but gives me a java error: Error: Could not find or load main class Pathy

I assume this is either related to my file permissions, PATH or CLASSPATH. But having very little experience with linux, I have no idea where to begin trying to sort this. owing to the "not found" response I'm assuming this is a PATH or CLASSPATH error, but when answering could you also mention permission setting as once the PATH is set that will likely be the next hurdle.

1 Answer 1

0

It was my classpath. A friend told me about the -cp flag that could be used to define the classpath. once that was in, the JVM found main().

however now i've just got to find out why it can't find the file i'm passing in for main to work on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.