473,233 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

compilation error : cannot resolve symbol

i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do???

C:\s\source>javac -d ..\classes devtestdrive.java
devtestdrive.java:5: cannot resolve symbol
symbol : class device
location: class devtestdrive
device d1=new tv();
^
devtestdrive.java:5: cannot resolve symbol
symbol : class tv
location: class devtestdrive
device d1=new tv();
^
devtestdrive.java:6: cannot resolve symbol
symbol : class device
location: class devtestdrive
device d2=new printer();
^
devtestdrive.java:6: cannot resolve symbol
symbol : class printer
location: class devtestdrive
device d2=new printer();
^
devtestdrive.java:7: cannot resolve symbol
symbol : class device
location: class devtestdrive
device d3=new micro();
^
devtestdrive.java:7: cannot resolve symbol
symbol : class micro
location: class devtestdrive
device d3=new micro();
^
devtestdrive.java:9: cannot resolve symbol
symbol : class devicetester
location: class devtestdrive
devicetester d4=new devicetester();
^
devtestdrive.java:9: cannot resolve symbol
symbol : class devicetester
location: class devtestdrive
devicetester d4=new devicetester();
^
8 errors
Aug 5 '08 #1
3 3141
JosAH
11,448 Expert 8TB
Set your classpath (-cp), output directory (-d) and sourcepath (-sourcepath) on
your javac command line and compile all your .java files at once (*.java).
Type 'javac -help' for details. Don't forget to 'import' the classes in each others'
source files (if they're in a package).

kind regards,

Jos
Aug 5 '08 #2
i compiled .java files all at once... but now am gettin an error at run time,

C:\s\source>java devtestdrive
Exception in thread "main" java.lang.NoClassDefFoundError: devtestdrive
Aug 5 '08 #3
JosAH
11,448 Expert 8TB
i compiled .java files all at once... but now am gettin an error at run time,

C:\s\source>java devtestdrive
Exception in thread "main" java.lang.NoClassDefFoundError: devtestdrive
Now type 'java -help' and read how you can set the classpath variable for the
JVM itself.

kind regards,

Jos
Aug 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
1
by: Tony Johansson | last post by:
Hello! I get compile error when compiling using the command javac from the command terminal window(CMD). I have just two classes which are called HelloWorld.java and Slask.java. I have both...
0
by: Tony Johansson | last post by:
Hello! I get compile error when compiling using the command javac from the command terminal window(CMD). I have just two classes which are called HelloWorld.java and Slask.java. I have both...
1
by: keithb | last post by:
This application works without error in the development environment using the VS web server. When I publish the site to my IIS 6.0 server, I get this error at runtime when I open the Change...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
3
by: ezmeralda | last post by:
Hello, I have some code which shall be compiled in .NET v1.1 and v2.0 but which has to be different for the two .NET-Versions. Therefore I need to use a construct like #if NET_20 <2.0...
1
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I...
5
by: tcby16 | last post by:
I am supposed to use two classes to perform one of three math operations depending on the user's choice. Use if statements to allow the user to choose which math operation to execute. So I created...
4
by: pjr | last post by:
Hi.. I am trying to compile a set of code using aCC 3.52(HP-UX 11.00) and visibroker 3.3. I am running into following error. I appreciate any ideas that can help me resolve this error. ...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.