Re: Classpath and the act of copying a file

Adam Sailer <[email protected]>
Newsgroups gmane.comp.java.netbeans.user-interface
Message-ID <[email protected]>
Try copying your files outside of NB, then go into netbeans and refresh 
directory, if that dosent work, unmount/remount the filesystem

Merrell, Kevin wrote:

>Hello all, I'm relatively new to NetBeans and Java, so I would appreciate some insight from you wizened ones.
>
>I've been building little example programs in NB to teach myself Java. Each one of these little example programs are contained in a different Filesystem. Each of these Filesystems are mounted, and I can browse through them, see all the files and everything.
>
>I started another new example program, and decided that I wanted to reuse a bunch of the code that I had written in a java class that was located in a filesystem other than the one for this new program. So, I went to the filesystem explorer, right-clicked on the class, and copied it. Then, I went to the filesystem for the new program I was writing, right-clicked, and selected paste-as-copy.  I then renamed it and proceeded to edit it as I needed for my new program.
>
>I was having major issues with compiling. I was getting "cannot resolve symbol" errors where I called out methods of this copied class. The code completion would work, I could see the methods as I was typing. But, when it came to running the program all I would get was errors. The solution I finally came up with was to create a new java class in the filesystem, and then cut and paste the code into that new class. Then I made the calls to that class and everything works fine.
>
>So, the question is, when you copy a class from one place to another, apparently it still has underlying ties to the old filesystem - those don't get switched to the new one. Is there some way to edit that classpath information? I can't find any sort of option that allows me to see how the files in a filesystem are tied together.
>
>A separate, but somewhat related question is, if I want to use a class in a differnet filesystem, how do I call out an "import" for that?
>
>Thanks!
>
>Kevin
>
>
>  
>

-- 
------------------------------------------------------------------------
 
------------------------------------------------------------------------
Adam Sailer
[email protected]
785 691 5978
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.