How to compile a java program w/ another java programs which are w/o a main method
- From: cjeffwang@xxxxxxxxx
- Date: 31 Oct 2005 08:48:21 -0800
I have been reviewing my "Java Tutorial" lately. For the
CounterDemo.java in IO\example-1dot1, javac CounterDemo.java showed an
error message that can not find the CountWriter/CountReader classes. I
have compiled these two java files at the same driectory.
How do I compile counterDemo.java?
TIA,
Jeffrey
G:\JavaTutExamples\essential\io\example-1dot1>javac CounterDemo.java
CounterDemo.java:5: cannot find symbol
symbol : class CountReader
location: class CounterDemo
CountReader cr = new CountReader(new FileReader("farrago.txt"),
'e');
^
CounterDemo.java:5: cannot find symbol
symbol : class CountReader
location: class CounterDemo
CountReader cr = new CountReader(new FileReader("farrago.txt"),
'e');
^
CounterDemo.java:6: cannot find symbol
symbol : class CountWriter
location: class CounterDemo
CountWriter cw = new CountWriter(new
FileWriter("outagain.txt"), 'e');
^
CounterDemo.java:6: cannot find symbol
symbol : class CountWriter
location: class CounterDemo
CountWriter cw = new CountWriter(new
FileWriter("outagain.txt"), 'e');
^
4 errors
.
- Follow-Ups:
- Re: How to compile a java program w/ another java programs which are w/o a main method
- From: Andrew Thompson
- Re: How to compile a java program w/ another java programs which are w/o a main method
- Prev by Date: Re: Implementing a Controller Servlet: forward to another servlet without cluttering up web.xml
- Next by Date: Re: about static variable
- Previous by thread: Implementing an automaton/creating a tuple
- Next by thread: Re: How to compile a java program w/ another java programs which are w/o a main method
- Index(es):