MyEclipse: [WebSphere] Using WebSphere-specific classes in projects
support-rkalla - Jul 17, 2008 - 06:51 PM
Post subject: [WebSphere] Using WebSphere-specific classes in projects
Some folks working with WebSphere (or any other server) may need to make use of server-specific classes in their projects that only the specific app-server provides in one of it's JARs.
For example, you might be using DistributedMap cache from WebSphere or RasHelper for application startup from your WebSphere (or other app server) install.
First you need to find the JAR that contains the class or classes you want to use (in the examples above, they are contained in the com.ibm.jaxws.thinclient_6.1.0.jar file). The problem is that once you find that JAR or JARs, you can't just add them to your project because they will (by default) get deployed with your project back to the app-server, causing a class conflict between the two copies of the system libraries.
Long-time MyEclipse user jandrews provided the following workaround to the issue that is an excellent approach to solving the problem. The premise of his solution is to modify the JRE your project is using to include the classes you need, because this resource is *never* deployed but will give you compile-time validation.
jandrews also suggested using the WAS JRE as the default JRE in your build path for your project instead of the default that is typically chosen (usually the Sun or IBM JDK) and adding the required WAS libraries to the JRE's list of libraries using the "Add External JARs" button as shown in the screenshot below:
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits