I have a Raspberry Pi Type Bi with Oracle java installed.
Previously I have been able to run java classes e.g. "java MemoryInfo" and the file would run.
Now I want to include a separate library and cant seem to get it to run. The java files and library run fine in Netbeans.
I am running the command "java -classpath sigar.jar CpuInfo" and is says could not find or load main class. I know the code is correct as it runs on netbeans.
Interestingly I can run "java -classpath sigar.jar MemoryInfo" even though the library is not required, it says the same about not being able to find the main class.
I have the library (sigar.jar) and the class files in the same directory (/home/pi). What am I missing? Help!
I have tried with another java file. It compiles ok with: "javac -cp avis-client.jar HelloWorld.java" but I get the same error when I try to run: "java -cp avis-client.jar HelloWorld"
The exact wording is: "Error: Could not find or load main class HelloWorld"
The location of the jar file is ok as it wouldn't compile without it!