tags:

views:

114

answers:

1

I'm fairly new to Eclipse so if this is something simple I apologize, however when I attempt to add an external JAR file to my build path (specifically the "rt.jar" file which contains certain tools that I require) and then rebuild my project, Eclipse will hang at the end of the Build process. It'll get to 100% then just hang there using 100% of one of my CPU cores. At first I thought it may have been due to the relatively large size of the rt.jar file, but I tried using smaller JAR files and it still hung at 100%.

Any help would be greatly appreciated!

If there is something wrong with using the rt.jar file does anyone know of another JAR file that contains both tools for dealing with SOAP requests as well as XML/DOM manipulation?

Thanks again!

+1  A: 

Assuming that the "rt.jar" you are talking about is the "rt.jar" from your JRE/JDK, you are going about this the wrong way. The "rt.jar" should be on the build path via the "installed JRE" that you have selected as your target platform.

  1. Remove the build path entry you created.

  2. Open the preferences for "Java > Installed JREs".

  3. If the JRE/JDK you want to use is listed, make sure that it is checked.

  4. If not, add it using the "Add" button. (You probably want to use the "Standard VM" wizard, but YMMV.)

(If you manually add an "rt.jar" to the build path, you will build and run against a hybrid class library where some classes will come from one version of Java and some from another. The result is completely unpredictable. An Eclipse build freeze is a bit unexpected, but this is not a (mis-)configuration that you would expect the developers to test regularly. If the freeze is happening when you launch your app, this is not at all unexpected. The hybrid nature of your effective class library is probably causing the JVM bootstrap sequence to go into an infinite loop.)

Stephen C
So, I understand what you're saying, but Eclipse is confusing me on this one.When I view my Installed JREs I see only "jre6" which, if I click on "Edit..." shows that it includes the rt.jar file. So the classes I want to utilize (specifically those in the javax.xml.soap and other various packages) should already be in the JRE.However, when I import these packages, Eclipse can't find them...then if I add that same rt.jar file to the build path Eclipse can magically find them.Here is a video I recorded illustrating what's happening: http://www.youtube.com/watch?v=gst53v9DLmQ
celestialorb
I cannot view that video right now. Expand the "JRE System Library" entry in the Package viewer, and scroll down. Do you see the "javax.xml.soap" package in there?
Stephen C
Alright, I've got it now. I guess the JRE System Library isn't included by default when one creates an Android project.Thanks for the help!
celestialorb