Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2004

Tip: Looking for answers? Try searching our database.

"cannot resolve symbol" but it's in the JAR file and in CLASSPATH

Thread view: 
chris - 15 Apr 2004 18:05 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.