Reputation: 25
I'm trying to submit java code as a job to qsub. The command goes
qsub -N job_$var -S /usr/bin/java -cp "classpath" file.java
qsub assumes that -cp is an argument to it and throws an error.
Upvotes: 1
Views: 766
Reputation: 7203
If this is Torque, you can use -F to send arguments to the job script and not to qsub:
qsub script.sh -F "arguments to script"
Upvotes: 0
Reputation: 27
This is not a Java issue, as it relates to how qsub expects command line arguments.
However qsub is expecting a script to run so try running the following instead:
qsub -N job_$var /path/to/script.sh
With script.sh having the following:
java -cp "classpath" mainjavaclass
Upvotes: 2