Community
Participate
Working Groups
Suspecting regression issue with bug 115637. I'm trying to work on some patches to the core Eclipse plugins, and am unable to export with my workspace default JRE setting for JDK 1.3. Regardless of the project's settings, the export always seems to use the workspace's default setting. Symptoms include the export failing with a generated error log, which shows that JDK 1.4/1.5 classes can't be found, like java.util.regex or javax.xml. I checked the project's configured JRE. Using either the "execution environment" or choosing an explicit "alternate JRE" doesn't make any difference. The manifest.mf also has a "Bundle-RequiredExecutionEnvironment: J2SE-1.4" entry. The thing is, I'm not sure that this ever worked properly. I tried 3.1.2, which doesn't have the concept of an "execution environment", but chose an alternate JRE and had the same issue of the alternate JRE not being used. Bug 115637 seems to state that this should be fixed "in the next I-build" (after the 2005-12-11 comment date.) So I tried 3.2M5a (dated 2006-02-23), same issue. Didn't try 3.2M4 (2005-12-15), as the date was so close, and without knowing the exact I-date, I doubted it would have been included. Also occurs in 3.2RC7. My current version where I first ran into this is the 3.2 stream maintenance build (M20060609-1217). The work-around is to change the workspace's default JRE. However, most of my projects require a JRE of 1.3, are configured to use the default JRE, and are locked into source control so I can't easily change them to use a specific, alternate JRE. I've been able to share a single Eclipse workspace for all my projects so far, so I'd rather not have to create a second workspace just for plugin work. Thanks!
you need to associate the execution environment with a JRE on the Java > Installed JREs > Execution Environments preference page.
Yes, my execution environments are all already associated there, includng both JDK 1.4 and JDK 1.5.
I'm not sure how it got there, but I have the following in the build.properties of my project containing the .product file: jre.compilation.profile = J2SE-1.5 That seems to be needed for the product export to use that JRE or source-level for compilation.
Interesting - for example, I'm opening the org.eclipse.debug.ui plugin from source. It already has the JRE System Library, etc. set to J2SE-1.4. So I tried adding the jre.compilation.profile line to build.properties, for both J2SE-1.4 then J2SE-1.5. However, for both I now get a "java.lang.OutOfMemoryError: PermGen space" error during export. It still works normally after switching my default JRE back up to 1.4/1.5...
Correction for comment #4, adding jre.compilation.profile did fix this! I had to restart my workspace to get rid of that memory error. However, I still think it needs to be looked into. How was I supposed to know about that setting? Everything else was ready to go immediately after the initial import. Any other settings pretty much update across any other places necessary. (For example, the "Overview" tab of Manifest.MF, "Execution Environments" section has a "update the classpath and the compiler compliance settings".) A quick search for the "jre.compilation.profile" property comes up with practically nothing. If this is just simply a necessary option, would it make sense for the plugins' source code to include this by default in the Eclipse source distributions? Also, after some further searching, I'm wondering if bug 136733 may be related...
the memory problem was likely from bug 130545. The pde.build considers the environments in order: jre.compilation.profile, Bundle-RequiredEE(s). The first one for which a mapping exists will be used for the export build. See http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tasks/pde_compilation_env.htm for more details.
Andrew, thanks for that info. For this scenario, the Bundle-RequiredEE(s) is defined as J2SE-1.4 (as already in source for org.eclipse.debug.ui). However, it is not being respected, and the build is still being done with my workspace's default JRE.
Marking this as duplicate of 153778. I've been secretly blaming improper setup for these kinds of bug reports, but there is a real bug here :) *** This bug has been marked as a duplicate of 153778 ***