-
Error with simple Application
This is a my program.
import javabook.*;
class MyFirstApplication
{
public static void main(String args[])
{
MainWindow mainWindow;
mainWindow= new MainWindow();
mainWindow.show();
}
}
When I complie it with message error:
C:\>javac MyFirstApplication.java
MyFirstApplication.java:1: package javabook does not exist
import javabook.*;
^
MyFirstApplication.java:6: cannot resolve symbol
symbol : class MainWindow
location: class MyFirstApplication
MainWindow mainWindow;
^
MyFirstApplication.java:7: cannot resolve symbol
symbol : class MainWindow
location: class MyFirstApplication
mainWindow= new MainWindow();
^
3 errors
Who help me to repair this program. Thanks
-
Looks like you need to tell the compiler where the javabook package is located.This is done by the classpath option on the javac command or you can set the CLASSPATH global environment variable.
Similar Threads
-
Replies: 2
Last Post: 09-26-2005, 11:35 AM
-
By Softwaremaker in forum ASP.NET
Replies: 4
Last Post: 11-30-2001, 04:13 AM
-
Replies: 0
Last Post: 11-21-2001, 01:21 PM
-
By neeraj in forum ASP.NET
Replies: 3
Last Post: 01-26-2001, 02:22 PM
-
By Brian Hoang in forum Java
Replies: 1
Last Post: 01-26-2001, 04:17 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks