- cannot resolve symbol???????????????/
- Posted by Donald on December 10th, 2003
I'm getting this error"cannot resolve symbol". I have created both
programs in the same dir. I can only compile one (Program 2 below).
Can anyone help me or lead me in right direction?
<-- ERROR -->
C:\Java.Temp\Sweetheart\Test13\TestReadFile.java:1 2: cannot resolve
symbol
symbol : class TestFrame
location: class TestReadFile
TestFrame cef = new TestFrame();
^
C:\Java.Temp\Sweetheart\Test13\TestReadFile.java:1 2: cannot resolve
symbol
symbol : class TestFrame
location: class TestReadFile
TestFrame cef = new TestFrame();
^
2 errors
Tool completed with exit code 1
<-- PROGRAM 1 -->
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class TestReadFile
{
public static void main(String[] args)
{
TestFrame cef = new TestFrame();
}
}
<-- PROGRAM 2 -->
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class TestFrame extends Frame
implements ActionListener, WindowListener
{.............
DataInputStream istream;
public TestFrame()
{
super("Read Event File");
try
{
istream = new DataInputStream(new
FileInputStream("TestEvents.dat"));
}...............
- Posted by Fred L. Kleinschmidt on December 10th, 2003
Donald wrote:
Your Program 1 refers to TestFrame, but does not indicate where to find
it. Since you do not specify a package for either file, they are in the
"default" package. Make sure you directory is included in your
CLASSPATH.
A better way is to specify both files in the same package, and create
the appropriate direectory structure to match the package name. Or place
Program2 in a package (in the appropriate directory structure), and
import that package into Program1.
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225
- How do I resolve conflicts? (Windows Media Center Edition) by Dick Smith
- RE: SP2 does not resolve Q330909 (Microsoft Windows) by Dietrich
- HELP RESOLVE AN ARGUMENT (Help and Support) by dave
- Re: Resolve Conflict from MCX doesn't resolve conflict (Windows Media Center Edition) by CJSnet
- Can't resolve any servers (Computers & Technology) by Dummheit

