Community
Participate
Working Groups
I'm having problems with getting eclipse to load files. I am using version 2.0.2. Here's the problem matrix: Everything works fine in Eclipse 1.x Same piece of code started breaking in one application but not another application in version 2.x. The piece of code to which I am referring works fine in a standalone gui to test out eclipse. However, when I add this same piece of code to our larger application, it breaks. The only difference between the two (it is looking like it initializes ok) is that the .class file for one is at the top level while the .class file for the other is in a jar file and a couple of levels down. Should that make a difference? Here's the code: Help helpSystem = new Help("C:\\projects\\olc\\sourceWSWB\\eclipse\\plugins"); helpSystem.start(); helpSystem.displayHelp("/com.ibm.storage.essisa.doc/myFile.html"); The errors I get are: Could not display help: com.ibm.storage.essisa.doc/myFile.html It doesn't even start up an eclipse help viewer, which it should do even if the file can't be found. I just get nothing but the error message. In the standalone driver it works perfectly.
Are there any problems reported in the .log file? The log file is written in the %temp%\help_system\.metadata directory. Does your larger application sets URL Stream Handler Factory [is calling java.net.URL.setURLStreamHandlerFactory(URLStreamHandlerFactory fac)]?
Is your application using at least jdk version 1.3.1_06 ? Does your application use any libraries that are also existent within Eclipse? Another words, is there a chance for a collision between classes within Eclipse and classes in your application?
I've figured out what is causing the problem, and a workaround, at least for my application. We use the XML parser libraries in our applications as well. However, if you include any references to xerces.jar or xmlParserAPIs.jar in your classpath - either your own, or the ones eclipse ships with, e.g., eclipse\plugins\org.apache.xerces_4.0.7 \xercesImpl.jar;eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar, then you get the behavior I described - the eclipse viewer will not start. A workaround for the time being is to unjar the aforementioned jar files and re- jar them with your own application's jar file. This works with both the application and the eclipse engine. I do think this should be fixed, however, as it was not broken like this in 1.x.
Wendy, Try including (either Eclipse's or your app's) xerces libraries in java boot path instead of the classpath for your application. For example: set JAVA_OPTS=-Xbootclasspath/a:d:\eclipse\plugins\org.apache.xerces_4.0.7 \xercesImpl.jar;d:\eclipse\plugins\org.apache.xerces_4.0.7\xmlParserAPIs.jar If this works, it eliminates the need to repackage files. Let us know the results here, please. You have solved the problem when using Eclipse 2.0.2. In 2.1 this has been fixed as Help launches Eclipse as a separate process to avoid such conflicts, so I will mark the bug as resolved.
Thanks for the info. The following works with either our jar files or eclipse's. -Xbootclasspath/a:xercesImpl.jar;xmlParserAPIs.jar
Infocenter architecture since 2.1 M3 build does not suffer from this problem. Changing target milestone to M3