aspose file tools*
The moose likes Beginning Java and the fly likes java: Cannot find symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java: Cannot find symbol" Watch "java: Cannot find symbol" New topic
Author

java: Cannot find symbol

Jake Hammer
Greenhorn

Joined: Jul 30, 2009
Posts: 24
Hello,

I have been struggling for some time with this. I have several .java files all in the same directory that I need to recompile for an upgrade project. One in particular is giving me some trouble...it is called Utils.java. This file accesses methods from another file called WebUserInfo. I have a file called WebUserInfo.java which I have successfully recompiled and I can see the .class file that was generated. When I try to compile Utils.java it throws several errors with regard to the methods contained in the WebUserInfo file...'cannot find symbol'. I have verified that the methods being called are indeed in the WebUserInfo file.

I've checked permissions and ownership on all the files and that is all in line. I am trying to run this on a linux system with the following command:


Can someone please help me out with this???

Thanks!!!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Without knowing anything about your directory/package hierarchy and where you're compiling it from, no.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
Also what the exact error messages are, please.
Jake Hammer
Greenhorn

Joined: Jul 30, 2009
Posts: 24
David Newton wrote:Without knowing anything about your directory/package hierarchy and where you're compiling it from, no.


Does this matter if everything is in the same directory?
Jake Hammer
Greenhorn

Joined: Jul 30, 2009
Posts: 24
Campbell Ritchie wrote:Also what the exact error messages are, please.


Most of the messages say:

Utils.java:### cannot find symbol
symbol : class WebUserInfo
location : class path.to.Utils
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Why not just post it? Seems easy enough.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And where you're compiling from.
Jake Hammer
Greenhorn

Joined: Jul 30, 2009
Posts: 24
The current directory '.'
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617



Do you understand that if we don't know your directory hierarchy, your package structure, and where you're attempting to compile from, there is no way to help you? You have a simple classpath issue. You're either compiling from the wrong place, or your directory/package structure is wrong.

We gathered you were compiling from the currrent directory.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Also, please see the JavaRanch naming policy.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10916
    
  12

xdfg sdf wrote:Does this matter if everything is in the same directory?

Folks are trying to help you. You should do everything you can to make it easy for them do do so if you want their help - such as answering the questions they ask to try and narrow down where the problem actually is.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

"xdfg sdf", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18117
    
  39

fred rosenberger wrote:
xdfg sdf wrote:Does this matter if everything is in the same directory?

Folks are trying to help you. You should do everything you can to make it easy for them do do so if you want their help - such as answering the questions they ask to try and narrow down where the problem actually is.


I guess the answer to the original question is...

xdfg sdf wrote:
Can someone please help me out with this???


Without the correct and complete info... no.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java: Cannot find symbol
 
Similar Threads
cannot find symbol
Regarding Package
static import of enums
GridLayoutFrame
How to read properties file?