 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
J F Hamilton Guest
|
Posted: Wed Jul 23, 2003 3:05 pm Post subject: Re: Import Problems |
|
|
This sounds similar to my problem - in my case, if I compile a file which
imports another file (in the same package), the new class file is generated,
but then the referenced class files are deleted, so that further attempts to
compile fail. The referenced files have to be rebuilt, but this doesn't
help if there is more than one file that references them - only the first
compile works, then all further files fail. An overall make is hopeless.
This problem sounds similar to others, but I don't see a fix. Using version
8.0.140.0 by the way.
"Giovanni" <groos (AT) exponant (DOT) com> wrote
| Quote: | Hi
I have read all the 'import problems' posts, but did not find a solution
Problem summary:
1. I have two tools JBuilder SE ver8 abd JCreator. The same code (see
below)
works for JCreator but not in JBuilder. -- probably a JBuilder setting
2. JBuilder DELETES my .class files in the package when I compile the
project!!? This happens when I specify my import statement to be specific
to
a .class file like: import theimport.TheImport;
What have I tried:
1. Ctreated a project with File | New Project...
2. Made sure that the scr and package folders are correct and that the
..java
and .class files are where they sould be
3. Created Libraries (import library) and attatched them to the project
with
Tools | Configure Libraries
Hope you can help!!
Thanks
Giovanni
CODE:
A: File to be imported:
package theimport;
public class TheImport {
public TheImport() {
}
public String GetString(){
return "Grs Import Test";
}
}
B: The Main Project which is importing the above file.
package myimporttest;
import theimport.*;
public class MyImportTest {
public MyImportTest() {
TheImport grs = new TheImport();
System.out.println(grs.GetString());
}
public static void main(String[] args) {
new MyImportTest();
}
}
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|