{"action":"opened","issue":{"url":"https://api.github.com/repos/jruby/warbler/issues/345","labels_url":"https://api.github.com/repos/jruby/warbler/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/jruby/warbler/issues/345/comments","events_url":"https://api.github.com/repos/jruby/warbler/issues/345/events","html_url":"https://github.com/jruby/warbler/issues/345","id":108155995,"number":345,"title":"Warbler GEMJAR - JARFILE not being cleared in JarMain when running multiple plugins","user":{"login":"David5645","id":9754205,"avatar_url":"https://avatars.githubusercontent.com/u/9754205?v=3","gravatar_id":"","url":"https://api.github.com/users/David5645","html_url":"https://github.com/David5645","followers_url":"https://api.github.com/users/David5645/followers","following_url":"https://api.github.com/users/David5645/following{/other_user}","gists_url":"https://api.github.com/users/David5645/gists{/gist_id}","starred_url":"https://api.github.com/users/David5645/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/David5645/subscriptions","organizations_url":"https://api.github.com/users/David5645/orgs","repos_url":"https://api.github.com/users/David5645/repos","events_url":"https://api.github.com/users/David5645/events{/privacy}","received_events_url":"https://api.github.com/users/David5645/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-24T15:35:01Z","updated_at":"2015-09-24T15:35:01Z","closed_at":null,"body":"I am running into issues when trying to run multiple plugins (separate gemjars) and the JARFILE variable not being cleared.  The first plugin will initialize correctly but when the second one is called, it references the old JARFILE (gemjar) from the first plugin.  If I am only using one plugin, I see no issues and my plugin works as expected.\r\n\r\nHere is how I am implementing my plugin.  I have two separate jar files, one containing standard java code that kicks off my plugin.  The second is a gemjars file created by warbler that is called by the first jar file.  \r\n\r\nHere is the java code that kicks off my plugin:\r\n\r\npublic void init() {\r\n    for (URL url : getDescriptor().getRuntimeLibraries()) {\r\n\t//adding Classpaths\r\n\tURLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();\r\n\tClass<?> urlClass = URLClassLoader.class;\r\n\tMethod method = null;\r\n\tmethod = urlClass.getDeclaredMethod(\"addURL\", new Class[]{URL.class});\r\n\tmethod.setAccessible(true);\r\n\tmethod.invoke(urlClassLoader, new Object[]{url});\r\n        }\r\n\ttry {\r\n                 //call to warbler JarMain Class\r\n\t\tJarMain.main(new String[] {});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"(Java) UCR failed to load! \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}\t\r\n}\r\n\r\nSystem Specifications:\r\nMac OSX\r\nJava 8 <- First Jar\r\nJruby 1.7.12  with Java 8 JVM<- GemJars\r\n\r\n\r\n "}}