Community
Participate
Working Groups
I have two projects with conflicting classpaths. The first is a standard Java project containing utility code. The second is a Java project that uses a J2ME class library (in its own folder) and does not use JDK libraries. The J2ME project uses the utility project. I accidentally made a class in the utility project import IdentityHashMap. I am using that utility class in the J2ME project and there is no IdentityHashMap in the J2ME lib that I'm using. This caused the autobuild facility to continuously attempt to rebuild the workspace. Removing the dependency on IdentityHashMap stopped the rebuilding.
Can you please paste in the .classpath files of the 2 projects.
Created attachment 13665 [details] The utilities project classpath
Created attachment 13666 [details] Classpath for the J2ME project that uses some of the utilities note that this uses its own classes.zip file instead of rt.jar, but it also references AR-Utilities, which uses rt.jar.
All I see is a source folder: <classpathentry kind="src" path="/AR-Utilities" exported="true" /> Where is the reference to rt.jar in the J2ME project?
Can you also try not exporting the libraries to see if that changes anything? Go to the Java Build Path->Order And Export page & deselect the libraries.
The J2ME project intentionally does not reference rt.jar (comment #3). That is the J2SE class library and it would be incorrect for a J2ME project to reference it. The J2ME project uses a J2ME classes.zip library in its libs folder instead of rt.jar. This creates an implicit requirement that any classes which the J2ME project uses from the utilities project must only use the subset of J2SE which is contained in J2ME. The violation of this requirement apparently triggered the continuous rebuild problem. Also, the AR-Utilities project exports the correct libraries -- these are needed by the projects that use the utilities project and would cause many compilation problems if they were eliminated. The exports from J2ME project are also required by other projects.
I understand J2ME projects do not want to reference rt.jar... but you said : "note that this uses its own classes.zip file instead of rt.jar, but it also references AR-Utilities, which uses rt.jar.". The confusion is over the name AR-Utilities. Is it both a source folder & a project?
To speed things up, please try making 2 small projects (based on your current 2 projects) that duplicate the problem.
Forget about comment #7 I missed the '/' in front of the name.
So any chance of making 2 small projects that duplicate your problem?
I've been trying -- so far no joy. You may have to write me off as a crackpot
No I believe you have found a problem, but we need to duplicate it to track it down. Do you have a cycle between any of your projects?
No cycles; the wierdness is that the project I'm working on has to run in both J2SE and J2ME, so I'm using the J2ME PPro class lib to make sure that I'm not using any J2SE-only features. I'm also using SWT, with the main GUI stuff being PPC compliant, but with subclasses that use extra J2SE features (like drag and drop, styled text, etc.). There are two projects that use the core J2ME/J2SE project, one that uses J2SE and one that uses J2ME. The Utilities project makes things worse, because it is a J2SE project and it does use/supply non J2ME-compliant code. Despite this one problem (and having to use custom class paths in the launchers), we have been very successful so far with this approach. We have an app that runs both on the Pocket PC (using J9) and on regular desktops.
Is everybody else experiencing the same problem(s)?
No one else has seen this problem and I can't reproduce it anymore. I tried making a few test projects with similar dependencies, but no joy there.
So you cannot reproduce it with your normal projects anymore? If so, we'll close this & you can reopen it if the problem comes back.
Closing until we get a reproduceable case.