Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot Resolve Symbol when compiling

843810Feb 13 2002 — edited Sep 20 2002
I have created a very small class in a directoy called c:\hottub as follows:

package hottub;
import java.awt.*;
import java.awt.event.*;
public class GenInfo
{
public GenInfo()
{
}
}


A class is created call GenInfo.class no problem.
My classpath is:

c:\java\steve;C:\java\bin

But I am compiling like this:
c:|hottub>javac -classpath c:\ GenInfo.java

Here is where the trouble begins:
I have tried this many ways. No matter what I try, I get the same result. Here is the code:

package hottub;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class HotTub
{ // open the class

private JTabbedPane tabPane;
private JFrame sframe;

// ----------> Constructor HotTub Starts <---------
public HotTub()
{ // open constructor
sframe = new JFrame("Safronuk System");

sframe.addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{ System.exit(0); }
});

tabPane = new JTabbedPane(SwingConstants.LEFT);
tabPane.setBackground(Color.blue);
tabPane.setForeground(Color.white);

loadTabPane();

} // close constructor


// ----------> loadTabPane method <------------
private void loadTabPane()
{ // open method
tabPane.addTab("General", new GenInfo());

} // close method


// ----------> Mainline <------------------
public static void main(String[] args)
{
HotTub ht = new HotTub();
}

} // close the class


In the loadTabPane method, just above Mainline, I keep getting Cannot Resolve Symbol with the arrow under GenInfo(). It was compiled many ways but here is one of them:

c:\hottub>javac -classpath c:\ HotTub.java

I have even tried putting all the code in the Steve directory and the same error occurs even when compiling by:

c:\java\steve>javac GenInfo.java
c:\java\steve>javac HotTub.java

In all cases GenInfo compiles and HotTub does not. Can somebody help me? I've been working on this for over a week.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2002
Added on Feb 13 2002
7 comments
88 views