× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Do you get "cannot resolve symbol"?  If so, that's because the file is not
located in the CLASSPATH properly.  Quick example.  Here's your directory
structure:

myroot
  +-- myjava
        +-- mypackage

1. Let's say you set your CLASSPATH to include \myroot\myjava.
2. You have two source files, Class1.java and Class2.java, both in myjava
3. Both have a package statement, "package mypackage"
4. Class1.java has no external references
5. Class2.java references Class1

Put yourself in your base Java directory (myjava).  If you then compile
Class1.java (using "javac Class1.java"), it will compile fine.  But
compiling Class2 fails with "cannot resolve symbol".  You MUST move the
class file (Class1.class) into mypackage.  Then Class2 will compile just
fine.

Joe


> -----Original Message-----
> From: java400-l-admin@midrange.com
> [mailto:java400-l-admin@midrange.com]On Behalf Of Mike Silvers
> Sent: Thursday, November 15, 2001 3:40 PM
> To: Java400L List
> Subject: Package problems
>
>
> Hi all.  I don't know if you remember, but a few weeks ago I posted a
> problem with using the javac command on a V5R1 box using the jdk 1.3.
> Well...I received the latest cume, loaded it and IPL'ed.  I was
> hoping that
> this would resolve my problem.  It didn't.  I have narrowed down the
> problem.  Apparently the java compiler on the 400 is not recognizing the
> package statement when compiling class files.  I have two
> classes, one being
> dependent on the other.  Each have the package statement defining the same
> package.  When I compile the first one all works well.  When I attempt to
> compile the second one, the java compiler will not recognize the
> first class
> that I just compiled!  When I remove the package statements from both, all
> works fine again.  It is definitely not a classpath or path problem.  Does
> anyone else have the same problem...and is there a PTF or "work-around"?
>
> Thanks
>
> Mike



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.