I have a java file called EXICodec.java which performs various operations thanks to the jar exificient.jar. They are in the same folder.
Here is the structure of the file EXICodec.java :
import java.io.FileInputStream;
import java.io.FileOutputStream;
[...]
import com.siemens.ct.exi.helpers.DefaultEXIFactory;
public class EXICodec {
/*
* Main
*/
public static void main(String[] args)
{
for (int i=0;i < args.length ; i++)
{
System.out.println(args[i]);
}
}
/*
* Attributes
*/
[...]
/*
* Constructor (default)
*/
public EXICodec()
{[...]}
/*
* Methods using import from exificient.jar
*/
[...]
When I compile, I run the following command : (and it works)
javac -cp exificient.jar EXICodec.java
And then I want to execute:
java -cp exificient.jar EXICodec
but I have the following error :
Error : java could not find or load main class EXICodec
Am I missing some basic thing ? I thought it was link to the package name. I had one and place the file in the proper folder but I got the same problems : it compiles but does not run.
EXICodecresides? You need to supply the fully qualified class name of the main class to run.