Eclipse RCP: add external directories to classpath -


i have eclipse rcp application, need add external jar files. problem can't add jars plugin , add plugin rcp application.

for several reasons must add paths directories jar files located. these jar files have added program's classpath @ startup. , paths directories variable (e.g. placed in file).

is there possibility add external paths somehow classpath?

add external directory classpath,there 3 method:

>  **1. system.setproperty("java.class.path", > system.getproperty("java.class.path")+";"+"directory");** 
  1. file file = new file("/home/../my.jar"); urlclassloader classloader = (urlclassloader) classloader.getsystemclassloader(); method add = urlclassloader.class.getdeclaredmethod("addurl", new class[] { url.class }); add.setaccessible(true); add.invoke(classloader, new object[] { file.touri().tourl() });

  2. configurate classpath variable in .bashrc


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -