Compilation and operation of Java programs under 1.linux
command line mode for compiling Java code under Linux:
Javac-cp.:./lib/sequoiadb.jar./com/sequoiadb/test/csandcloperation.java
command line mode for compiling Java code under Linux:
Java-cp.:./lib/sequoiadb.jar com.sequoiadb.test.CsAndClOperation
The compilation and operation of JUnit test cases under 2.linux
command line mode for compiling JUnit test cases under Linux:
Javac-cp.:./lib/junit.jar:./lib/sequoiadb.jar:./lib/hamcrest-core-1.3.jar./com/sequoiadb/test/clquery.java
command line mode for compiling JUnit test cases under Linux:
Java-cp.:./lib/junit.jar:./lib/sequoiadb.jar:./lib/hamcrest-core-1.3.jar Org.junit.runner.JUnitCore Com.sequoiadb.test.CLQuery
Org.junit.runner.JUnitCore is a framework for running unit tests that supports JUnit 4,junit 3.8.x, as well as mashup usage. When you start executing junit test cases from the command line, use Java org.junit.runner.JUnitCore TestClass1 TestClass2 .... For a test case, use the static method Runclasses (class[]). If you want to add a special listener, you can create an instance of Junitcore and use it to run the test case. -----Detailed Link: http://junit.sourceforge.net/javadoc/org/junit/runner/JUnitCore.html
This method is called to the class: Org.hamcrest.SelfDescribing, which belongs to Hamcrest-core-1.3.jar, so it needs to be added when compiling and running.
3. Extension
For Java small White, the understanding of Java's package is very important. Java's package is a very interesting thing, a bit similar to the C + + library.
Question: 1. What is the way to compile and execute multiple Java source code files? Need to understand the basic Java syntax and write Java Code.
JUnit test Case compilation and run configuration under Linux