File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes compile problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "compile problem" Watch "compile problem" New topic

compile problem

chris baylor

Joined: Nov 13, 2008
Posts: 1
im having an issue with compiling a practice code.

Im importing from swing and i have set my path to the right directory but when i try to compile it gives me:
cannot find symbol

my computer didnt have a classpath so i created one and put the location in there but it still didnt work.
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
What symbol can't it find ?
Show the code (in code tags) and the full and exact error message

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46349
Delete the classpath you have just created; it is unnecessary.
And as Joanne said, Tell Us The Details. "Cannot find symbol" usually means an error in the code.

And welcome to JavaRanch
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

aside from saying "cannot find symbol", the error message tells you exactly what symbol it cannot find and on what line. if it's a variable, make sure it's in scope. sometimes a misplaced declaration can do it:


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: compile problem
It's not a secret anymore!