aspose file tools*
The moose likes Beginning Java and the fly likes Have resolve symbol problems with a constructor.  Please help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Have resolve symbol problems with a constructor.  Please help." Watch "Have resolve symbol problems with a constructor.  Please help." New topic
Author

Have resolve symbol problems with a constructor. Please help.

Chris Singer
Greenhorn

Joined: Nov 27, 2001
Posts: 15
Help. I'm getting the following error when I try compiling a very simple program. And I'm getting the following error:
<pre>
[root@Linux voice-mail]# javac -classpath .:/usr/java/j2sdk1.4.0/:
/usr/java/j2sdk1.4.0/lib/:
/usr/java/j2sdk1.4.0/jre/lib/ VoiceMail.java
VoiceMail.java:29: cannot resolve symbol
symbol : constructor HexArray (int[],int)
location: class HexArray
hexCommand = new HexArray(cmd, length);
^
1 error
</pre>
(Note the carrot is under the n in new)
I have the Class HexArray in a seperate file in the same directory as VoiceMail.java and there is a constructor that takes an int array and an int as parameters. I'll include the code just in case I have made some boneheaded mistake. Here goes:

I believe my problem is an environmental problem but I have no clue as to what it could be. I have tried all many of class path settings to no avail. I'm running this on a Linux box with JDK 1.4.0 if that is of any use. Thank you all for taking the time to read this.
Chris
(edited by Cindy to format code)
[This message has been edited by Cindy Glass (edited November 27, 2001).]

(edited by Marilyn to shorten dashed lines and commented lines)
[This message has been edited by Marilyn deQueiroz (edited November 28, 2001).]
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

When I tried to paste this code into my editor the first problem I noticed was this:

Since I don't know what you want this 'for' loop to look like I can't do much else. Post back when you fix the code up.
Please use the code tags to make your post more read-able.
Thanks.


Please ignore post, I have no idea what I am talking about.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Constructors do not have a return type. Putting the "void" in the signature converted them from a constructor to just a regular method that you never called.


"JavaRanch, where the deer and the Certified play" - David O'Meara
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Thanks for the edit Cindy, but now the post is too wide for my screen.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
Better?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Way.
 
Consider Paul's rocket mass heater.
 
subject: Have resolve symbol problems with a constructor. Please help.