Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem with setting the classpath
Problem with setting the classpath [message #547441] Fri, 16 July 2010 20:03 Go to next message
Bahar Sateli is currently offline Bahar SateliFriend
Messages: 19
Registered: May 2010
Location: Canada
Junior Member
Hi all,

I am developing a plug-in for eclipse in which I have to reference to a shared library in form of a .jar file - that is external to the project. In other words, the .jar file that I want to use is in my system file and not in the Eclipse workspace.

I tried to add the .jar file in the plugin.xml runtime classpath tab, that was also reflected in MANIFEST.MF file as the following:

Bundle-ClassPath: .,
/home/MY_USER/THE_PATH_TO_THE_FILE/myfile.jar


but still when I run the plug-in it cannot find the classes inside the jar file and gives me:

Exception in thread "Thread-4" java.lang.NoClassDefFoundError


Can anybody please help me with this?

Thanks,
Bahar

P.S. I am using Linux SuSe!
Re: Problem with setting the classpath [message #547748 is a reply to message #547441] Mon, 19 July 2010 14:13 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Bundles can only see classes in other bundles. Bundle-ClassPath is by
default relative to the base of the bundle.

But, there is a way to reference an external jar, using external:
http://dev.eclipse.org/newslists/news.eclipse.technology.equ inox/msg01146.html

But how will you deploy? How can you make sure that the external lib is
there for your plugin to consume? How will it be available on your
user's/customer's machines?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:autosave snapshot
Next Topic:How to call Java RCP based application from Java Swing
Goto Forum:
  


Current Time: Tue Dec 07 00:47:42 GMT 2021

Powered by FUDForum. Page generated in 0.04882 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top