Take the 2-minute tour ×

after successfully building my application the start fails because it relies on config files which are located in the META-INF directory and after the build this directory is zipped into a jar file, hence making it unable to access the config files. After manually unzipping the jar, deleting the jar and renaming the directory with xxx.jar the program runs without a problem. The config files are needed for SSO login (Kerberos). Here is the code:

Bundle bundle = Platform.getBundle(Application.PLUGIN_ID);
String path;
try {
    path = new URL(bundle.getLocation().substring(18)).getPath();
} catch (MalformedURLException e1) {

Path variable contains something like "plugin/mydomain.pluginame-xxxx.jar/" But it seems that the System needs the jar unzipped.

That am I doing wrong building the app? Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

After changing the code to:

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    URL authconf = null;
    authconf= cl.getResource("META-INF/jaas-win.config");

    if (authconf == null) {
        loginContext = null;

    String p;
    try {
         p = URLDecoder.decode(authconf.toExternalForm(), "UTF-8");
         System.setProperty("java.security.auth.login.config", p);
    } catch (UnsupportedEncodingException e1) {
        loginContext = null;

it works now.

share|improve this answer
add comment

Your Answer


