I’m on ubuntu 10.04
when I try to execute a java program in a directory I get a ClassNotFoundException.
I run the program with this command:
java -cp . Cli
This should run right? I am in the same directory as the Cli.java file, as you can see from the ls command. I have tried setting the CLASSPATH variable, I believe things broke after this. I did delete the CLASSPATH export from my .bashrc
What can I try?
root@ubuntu:/usr/local/jahmm-0.6.1/src/be/ac/ulg/montefiore/run/jahmm/apps/cli# ls
AbnormalTerminationException.java CreateActionHandler.java KMeansActionHandler.java Types.java
ActionHandler.java Garage.class Operations.class Vehicule.class
BWActionHandler.java GenerateActionHandler.java Operators.class WrongArgumentsException.java
Car.class HelpActionHandler.java PrintActionHandler.java
Cli.java IntegerOperators.class RelatedObjs.java
CommandLineArguments.java KLActionHandler.java Test.class
You’re in the same directory as the
Cli.javafile, but you’re trying to run it, not compile it… you need to compile it first: