Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add the external jar to the eclipse rcp application?

I tried to add the apache vfs jar file as the runtime dependency. Even though it throws the below error:

java.lang.ClassNotFoundException: org.apache.commons.vfs.VFS at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at file_explorer.View.setInput(View.java:295) at file_explorer.View.initialize(View.java:130)

How can i resolve this, thanks in advance.

like image 628
prabakaran ramu Avatar asked Aug 04 '09 13:08

prabakaran ramu


People also ask

Why can I not add external JARs in eclipse?

If your project builds with Java 9+ make sure you've selected Classpath (as shown here). You should also be able to add the JAR with right-click on the project > Build Path > Add External Archives.... If that doesn't help, would you tell use the version and package of Eclipse IDE you're using?


1 Answers

If you are looking for adding the required jars to your project classpath.Add the required files to lib directory in the project structure.Then from project click the 'run time' tab of plugin.xml and add the required jars from the lib directory to the project classpath.

like image 84
Jaknap Ramuk Avatar answered Oct 20 '22 20:10

Jaknap Ramuk