There is a jar file at /somewhere/bung.jar that has a class I'm using.
jar tv tells me this
/com/mycompany/things/Account.class
My CLASSPATH has .:/somewhere/bung.jar
My import statement is
import com.mycompany.things.*;
But yet when I try to compile with "javac test.java" it complains with
"cannot resolve symbol" constructor Account
What on Earth am I doing wrong? Using java 1.4.2 on SunOS. Thanks.
chris
Carl Howells - 15 Apr 2004 20:31 GMT
> There is a jar file at /somewhere/bung.jar that has a class I'm using.
> jar tv tells me this
[quoted text clipped - 9 lines]
>
> "cannot resolve symbol" constructor Account
^^^^^^^^^^^
Key word: "constructor". That means it's found the class named Account.
But, whatever constructor you're trying to use is either not present
or not visible (protected, private, package, whichever).
Check the documentation for how you're supposed to get an Account instance.
Roedy Green - 15 Apr 2004 22:29 GMT
>"cannot resolve symbol" constructor Account
Are you sure that Account.class contains a public constructor of the
appropriate signature?
Maybe you left out your package statement and the constructor has
default scope, and you can't see it.
It is hard to sort out such a problem without having all the code to
look at.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
chris - 15 Apr 2004 23:02 GMT
> There is a jar file at /somewhere/bung.jar that has a class I'm using.
> jar tv tells me this
[quoted text clipped - 13 lines]
>
> chris
nevermind. I'm a moron. My code doesn't match the libs that I'm
expecting. The constructor has changed.
thanks though.
chris