Building Eclipse RCP application, running fails

Posted by Raven on Stack Overflow See other posts from Stack Overflow or by Raven
Published on 2010-03-18T08:06:38Z Indexed on 2010/03/18 8:11 UTC
Read the original article Hit count: 645

Filed under:
|
|
|

Hi,

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) {
    System.out.println(e1);
    path="";
} 
System.setProperty("java.security.auth.login.config",path+"META-INF/jaas-win.config");

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

© Stack Overflow or respective owner

Related posts about eclipse

Related posts about java