Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 678199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:07:24+00:00 2026-05-14T01:07:24+00:00

after successfully building my application the start fails because it relies on config files

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:07:25+00:00Added an answer on May 14, 2026 at 1:07 am

    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;
            return;
        }
    
        String p;
        try {
             p = URLDecoder.decode(authconf.toExternalForm(), "UTF-8");
             System.setProperty("java.security.auth.login.config", p);
        } catch (UnsupportedEncodingException e1) {
            loginContext = null;
            return;
        }
    

    it works now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote an application in the Eclipse, which was successfully compiled and run. After
I am using Struts application while running welcome page is run successfully after that
I want to start my successfully installed Java program after the installation finished. I
i am building an music application in iphone which i have made using AVAudioPlayer,and
I am building an application which uses Flashdata to display messages to the user
I'm building an application after converting VC++ 6 workspace on Visual C++ 2008 express.
I am using Maven 3 for build Dashboard project After building my web application
I am having problems building a library in VC9, but which was previously successfully
After successfully building the distribution version of my app for submission to iTunes Connect,
I'm using NetDataContractSerializer . After successfully deserializing an object, is there a way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.