How to fix unrecognised JRE library in WebSphere / Rational Software Architect project
I have just imported the usual range of projects into a workspace, and am using Rational Software Architect version 7.
For the majority of projects I get this error:
"The project was not build since its build path is incomplete. Cannot find the class file for java.lang.Object"
Looking at the Java Build Path for one of these projects I see that no JARs are listed under the JRE System Library [WebSphere v6.1 JRE]. Removing this library (then saving it) and adding it back again seems to fix the problem.
Looking at the raw .classpath files, the "correct" one contains:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
and the broken one (loaded from ClearCase) looks like this:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere v6.1 JRE"/>
Editing 开发者_C百科each project's .classpath doesn't feel like the right solution to me so I'm wondering if anyone can tell me what's going on here and suggest a better (permanent) solution.
The "correct" one here is basically using the "default" JRE defined to RSA.
The "incorrect" points to a particular JRE. That particular JRE isn't installed on your system, probably because you didn't install the WebSphere Application Server 6.1 compile-time libraries during the RSA installation process.
Have you recently migrated your projects, or are using a different flavor of RAD / RSA than you used to? I have seen this happen so many times before. RAD / RSA are notorious for "surprising" developers with considerably-stupid "migration" processes.
You need to use the feature (export -> project interchange). That is the correct way for you to move projects between RAD/RSA workspaces/installations since it will export with dependences and with the right configs. The other option is to use something like CVS.
精彩评论