Can anyone tell me how to resolve the following compile-time error?
I have two classes: UserInterface and TestUserInterface. Both are in the same package.TestUserInterface.java:5: cannot find symbol
symbol: class UserInterface
location: class projects.web.TestUserInterface
UserInterface ui = new UserInterface();
To compile and run them I use the following cmds respectively:
Code:javac -d ..\classes projects\web\TestUserInterface.javaFollowing is the code for both classes:Code:java -cp ..\classes projects.web.TestUserInterface
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 clasCode:package projects.web; public class TestUserInterface{ public static void main(String[] args){ UserInterface ui = new UserInterface(); } } // end TestUserInterface class



Reply With Quote
Bookmarks