473,326 Members | 2,126 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,326 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 3145
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. ...
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
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...
1
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.