I have a package called UnionFind, a class in that UnionFind package called Test which has a method called main. When I try to run it, I get "cannot find main class" etc, so I try java -cp . UnionFind.Test and it still says the same.
I have written the following Java source file (Hello.java):
package com;
public class Hello {
public static void main(String[] args) {
System.out.println("Hello!");
}
}
I save this to C:/tmpjava/Hello.java.
From the command line, I navigate to that directory and run javac Hel...
Im using fedora 19.
Content of HelloWorld.java :
class HelloWorld {
public static void main( String args[] ) {
System.out.println( "Hello World!!" );
}
}
I can successfully compile it using
javac HelloWorld.java
But i cannot run it using
java Hello...
I am having trouble compiling and running my Java code, intended to allow me to interface Java with a shared object for Vensim, a simulation modeling package.
The following code compiles without error:
javac -d . -cp ./apache-log4j-1.2.16/log4j-1.2.16.jar:./vensim.jar SpatialModel.java Vens...