B
bb
I have a class file with a main method in the following directory:
C:\tea\emat\web\WEB-INF\classes\emat\com\edi
The name of the file is: Edi210Parser. The class has a main method.
I've developed and tested the file under Eclipse, which has shielded me
from the classpath and command-line args.
I've defined the file in the Windows classpath setting as:
C:\tea\emat\web\WEB-INF\classes\emat\com\edi;
For the life of me I can't remember how to run the file from a Windows
command-line. I've tried the following:
c:>java -classpath emat\com\edi\Edi210Parser out.txt (to read the input
file that exists in the same directory)
I've changed directories to the place where the file is:
C:\tea\emat\web\WEB-INF\classes\emat\com\edi and run:
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java Edi210Parser out.txt
and
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java
emat.com.edi.Edi210Parser out.txt
The closest I've come to getting it right is:
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java -classpath
EdiParser210 out.txt
which results in:
Exception in thread "main" java.lang.NoClassDefFoundError: out/txt,
which makes no sense at this point but shows (or seems to) that the
class was found.
Any help would be appreciated....
C:\tea\emat\web\WEB-INF\classes\emat\com\edi
The name of the file is: Edi210Parser. The class has a main method.
I've developed and tested the file under Eclipse, which has shielded me
from the classpath and command-line args.
I've defined the file in the Windows classpath setting as:
C:\tea\emat\web\WEB-INF\classes\emat\com\edi;
For the life of me I can't remember how to run the file from a Windows
command-line. I've tried the following:
c:>java -classpath emat\com\edi\Edi210Parser out.txt (to read the input
file that exists in the same directory)
I've changed directories to the place where the file is:
C:\tea\emat\web\WEB-INF\classes\emat\com\edi and run:
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java Edi210Parser out.txt
and
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java
emat.com.edi.Edi210Parser out.txt
The closest I've come to getting it right is:
c:\tea\emat\web\WEB-INF\classes\emat\com\edi>java -classpath
EdiParser210 out.txt
which results in:
Exception in thread "main" java.lang.NoClassDefFoundError: out/txt,
which makes no sense at this point but shows (or seems to) that the
class was found.
Any help would be appreciated....