Community
Participate
Working Groups
AAAAAAARGH!!! I tried to get rid of the useless SanFrancisco project I created. I clicked delete project, and I was VERY careful to reply NO to the question if I wanted to delete all files in the project. Then, I received a messgae whether I wanted to delete selected read-only files. I said NO again, but then my project stayed. So I tryed again, said NO again first, and then yes to the read only things (thinking these were some private eclipse files). Some time later (because I thought, maybe I can create some jar files, just for the purpose of fooling eclipse) I found that ALL my class files were GONE. The 20,000 other files were still there. I had to re-install the IBM SanFrancisco framework, and I was just soooo happy that I did not try this on my daily work PC! ===> what did eclipse do with my class files??? <=== Regards, Ghica. "Ghica van Emde Boas" <emdeboas@bronstee.com> wrote in message news:a3r0vr$vks$1@rogue.oti.com... > This is what happened while crating the SanFrancisco project: > > java.lang.ArrayOutOfBoundsException encountered while running > org.eclipse.jdt.internal.core.newbuilder.JavaBuilder. > > And, I have now a project with about 20.000 files (html, resources, etc), > but NO .class files. This is the opposite of what I need! > > Regards, Ghica. > > "David Wegener" <wegener@mcs.net> wrote in message > news:a3nh7q$utt$1@rogue.oti.com... > > Create a project called SanFracisco and point to the d:\sf directory > instead > > of using the default location. Create a second project called My project > > and point it at c:\myproject. You will need to use the src directory > option > > if myproject isn't the root of your package structure. On the projects > tab > > for myproject select SanFrancisco. This will place the SanFrancisco > classes > > in your classpath. > > > > Dave Wegener > > "Ghica van Emde Boas" <emdeboas@bronstee.com> wrote in message > > news:a3n3h3$rb7$1@rogue.oti.com... > > > I would really like to restart on my attempt to use eclipse for my daily > > > Java work. But I am stuck... > > > Can someone solve this for me, or am I out of luck? > > > > > > This is the directory set-up, there is no way I can change it: > > > The IBM SanFrancisco framework consists of some 6000 class files, > located > > in > > > d:\sf\sf210\... (no jars, no source code) > > > > > > My project is located in c:\myproject > > > > > > My question, is there any way to define a Java project for this setup in > > > Eclipse?? > > > I have searched for a way to use a set of external class files, but I > > cannot > > > find it. > > > > > > Ghica. Martin Möbius wrote: >>>Best is to fill a bug report against jdt-core. Also the exception you got >>>seems "wrong". Cheers! Ghica
Which build number are you using ? Which platform (win32 or Linux) ? Something did go definitely wrong on our end...
The build I was using was the 20011206 stable build, platform W2K. Martin Mobius wrote this in the forum: >I tried to get a smaller libary just with classes to a classpath. Seems >there is no way. Strange things happend, and in the end all my class files >were gone. So be aware with experiments! That was too late for me, but it must be easy to recreate.
When you define a new Java project with an empty source folder but numerous .class files in the 'bin' directory, the builder will delete them when it tries to compile the .java files. Every .class file in the bin directory is the result of compiling a .java file. To add a project which you do not have source for & as a result will not modify, you should not define source or bin folders, but instead add the necessary jar files. Why can you not build jar files from the .class files?
>>Why can you not build jar files from the .class files? This is the wrong question. I just cannot. I am part of a very large project. Of course I made some jars as a workaround to be able to try out Eclipse. Still, I think you should fix this. Such are the facts of life. Even if I could make jars, it is no excuse for wiping out my class files!
Sorry but I think you missed my point. A .class file is the result of compiling a .java file. Class files are not stand alone resources. So the first step of a project build which contains source files is to wipe the output directory. Can you add the source files instead of the class files?
Maybe you missed my point too. The IBM SanFrancisco framework is provided as a directory structure with about 6000 class files. For reference there is -some- source too, but by no means all of it. What I meant to say is, that if you are working in a large project, then the project structure is a given for most developers. I cannot change it, just because as an individual developer I would like to use Eclipse. I am trying to use Eclipse, because if successful, I may try to promote using Eclipse by a larger group of developers at the company I am currently working for. This company has a large ordering application based on the IBM SanFrancisco framework. The Java environment does in no way force you to use jars. Neither should Eclipse. I agree that it would be better to use jars, but again, it is a fact of life that I cannot. I can understand why Eclipse is wiping out my class files, but I still think that this is a show-stopper bug. Before trying to recompile soething, Eclipse should check whether the source code is actually available. The only thing I ever wanted to configure for my project is saying: "here is a directory full of class files. Do not touch it!", in the same way as you can use external jars. Again, it is not in my power to make jars out of the class files, and I do not have the source (only IBM has it). To summarize: I have a directory full of class files, I have no source. This is valid Java, please let me use Eclipse! (and do not destroy my stuff). Regards, Ghica.
Sorry I didn't know this was already possible... you can add additional folders with other class files to your build path. 1. Define your project with new empty source & bin folders that do not conflict with existing directories. 2. Then add a 'new' generic folder to the project which matches the existing directory with all the class files. 3. Then add this folder to the project's Java Build Path -> Libraries tab. All the class files will be visible & will be left as is. Please let us know if this solution works for you.
You wrote: >> Please let us know if this solution works for you. Well, I saw that, after jumping through some hoops, I can indeed have a directory full of classes without source. Eclipse wants to own the 30,000 other files except the 6000 class files in that directory also. I do not like that at all. I did not check yet wether I can have my source on c:\ and my framework classes on d:\ and I do not NOT want to try whether the latest stable version of Eclipse (20020214) will still wipe out my class files if given an empty source library. And, I still get very mysterious error messages like: An error occurred while creating the java project - Invalid project description - Details: c:/myproj/mysub and c:/myproj/mysub overlap. Eclipse is a brave attempt to set a new standard for IDE's. It is therefore very disappointing that it has such a limiting concept of what a project is. For the IDE's I used before, I was used to be able to define any classpath, source path or output path, as long as allowed by java or javac. Even VAJ would never interfere in unexpected ways with my filesystem. Eclipse is definitely a step back in this respect and I sincerely hope that it will not stay that way.
"Eclipse wants to own the 30,000 other files except the 6000 class files in that directory also." Sorry I don't understand what you mean. Eclipse does not copy/delete any files in a class file directory. It just adds the directory to the build path. Its not included as a source folder in the build. "I did not check yet wether I can have my source on c:\ and my framework classes on d:\ and I do not NOT want to try whether the latest stable version of Eclipse (20020214) will still wipe out my class files if given an empty source library." Then what else can we do to help? There is clearly a workable solution to your problem. "Even VAJ would never interfere in unexpected ways with my filesystem." VAJ did not store class files in the filesystem. It stored them in its own library so the comparison is not valid.
A workable solution exists for this problem. Users have control when creating a new project in which they do not intend to develop/modify the available source.