Reputation: 1
I have a snmp agent running in my machine, which will run a shell script when a snmpwalk request came to the agent with a particular OID. By
exec TestFile /bin/sh /location/of/file/testShFile.sh
Then the sh file in turns call a java file to check the connectivity to other server and returns the o/p to snmp request.
Java file is in package --> a.b.foo.test.Test.java and sh file also resided in --> a.b.foo.test.testShFile.sh
Now how to run the java file from this shell script, as i am getting a NoClassDefFoundError.
Upvotes: 0
Views: 2071
Reputation: 2192
Extend your shell batch file to output or log the current setting of the classpath. Probably its not set at all.
Why don't you directly invoke the other Java method?
Upvotes: 1