Re: Passing objects (not stones)
From: Ryan Stewart (zzanNOtozz_at_gSPAMo.com)
Date: 02/27/04
- Next message: Jeff Rhines: "Re: reuse a thread which is no longer "alive""
- Previous message: Jeff Rhines: "Re: Runtime.getRuntime.exec question"
- In reply to: NotAsDumbAsILook: "Re: Passing objects (not stones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 26 Feb 2004 19:10:33 -0600
"NotAsDumbAsILook" <toyota_trekker@yahoo.com> wrote in message
news:e3d370c6.0402260942.73c2e895@posting.google.com...
> Oops! I was "simplifying" the code I posted and didn't rename that
> MPNode as MyClass. That might be a little confusing.
>
> Anyhoo, I figured out what the problem was, but I don't understand why
> it was a problem. So, I'm going to alter the question.
>
> Like I said before, I'm using NetBeans 3.5.1. I was putting together a
> little sample application so that I could figure out how to make a
> good TableClass while working with an ArrayList of Objects. Well, in
> order to save time coding, I copied over the class MyClass from
> another project I am working on using the NetBeans Filesystem Explorer
> (you right-click, copy, and then paste-as-copy in the new Filesystem).
> Apparently there is something in the background that was giving
> NetBeans grief. I could declare a new MyClass() object, and then use
> the Code Completion to see the methods and variables in it. But, when
> it came to compile time, the compiler couldn't see those methods, so
> it was giving the "cannot resolve symbol" error.
>
> I vaguely remembered seeing a similar problem with Delphi a few years
> ago, and I tried a similar fix I used then. I created a new class
> inside of the Filesystem I was working in - by doing a right-click,
> new, java class. Then I cut and pasted the code from the original
> MyClass into this new one, and referenced it instead of the old
> MyClass object. Now the code complies just fine.
>
> So, the error lies in copying a class from one filesystem into
> another. I know that you normally wouldn't do that, but there is the
> rare occasion where you would. Any thoughts?
It depends on what exactly you're doing. If you're pasting into a
subdirectory of a mounted directory, your file is not in the classpath. It's
considered part of a Java package. Therefore you must have a package
statement in the source file and import the package in order to use class.
- Next message: Jeff Rhines: "Re: reuse a thread which is no longer "alive""
- Previous message: Jeff Rhines: "Re: Runtime.getRuntime.exec question"
- In reply to: NotAsDumbAsILook: "Re: Passing objects (not stones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|