MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
support-rkalla
Post subject: [WebSphere] Using WebSphere-specific classes in projects  PostPosted: Jul 17, 2008 - 06:51 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

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:



add-jars-to-jre.png
 Description:
 Filesize:  169.44 KB
 Viewed:  14858 Time(s)

add-jars-to-jre.png


 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits