Can anyone tell me how to resolve the following compile-time error?
[QUOTE]
TestUserInterface.java:5: cannot find symbol
symbol: class UserInterface
location: class projects.web.TestUserInterface
UserInterface ui = new UserInterface();
I have two classes: UserInterface and TestUserInterface. Both are in the same package.
To compile and run them I use the following cmds respectively:
[CODE]javac -d ..classes projectswebTestUserInterface.java
[CODE]java -cp ..classes projects.web.TestUserInterface
Following is the code for both classes:
[CODE]package projects.web;
import java.awt.*;
import javax.swing.*;
public class UserInterface extends JFrame{
JPanel menuPanel = new JPanel();
JPanel contentPanel = new JPanel();
JPanel selectionPanel = new JPanel();
JButton save = new JButton(“Save”);
JButton addFiles = new JButton(“Add”);
public UserInterface(){
super(“File Upload”);
setSize(500, 500);
menuPanel.add(addFiles);
selectionPanel.add(save);
setLayout(new BorderLayout());
add(menuPanel, BorderLayout.NORTH);
add(contentPanel, BorderLayout.CENTER);
add(selectionPanel, BorderLayout.SOUTH);
} // end constructor
} // end UserInterface clas
[CODE]package projects.web;
public class TestUserInterface{
public static void main(String[] args){
UserInterface ui = new UserInterface();
}
} // end TestUserInterface class