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 8841819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:48:53+00:00 2026-06-14T10:48:53+00:00

I have extremely strange thing going on with my java application. In summary, the

  • 0

I have extremely strange thing going on with my java application. In summary, the problem is that it sometimes closes itself after 30-60 seconds of work.

The specifics of the situation are as follows:

  • The application is actually launched in applet setting, the applet loads the main application jar, saves it to disk, then launches the actual program via reflection. The applet jar is signed, the application jar is not signed, so I had to override the security manager. The code is as follows:

    System.setSecurityManager(new SecurityManager() {
       @Override public void checkPermission(Permission p) {}
    });
    URLClassLoader loader = new URLClassLoader(new URL[] {mainJarFile.toURI().toURL()}, this.getClass().getClassLoader());
    Class<?> app = Class.forName("launch.App", true, loader);
    Method start = app.getDeclaredMethod("start", URL.class, URL.class);
    start.invoke(app.newInstance(), codeBase, documentBase);
    
  • The crash happens only when the applet is run via Citrix connection to terminal servers.

  • The crash isn’t, in fact, a crash. In log file, I see that shutdown hooks are started and finished as they should during normal shutdown.
  • If the applet is ran with java console visible and trace option on, I see the following message just before the shutdown:

    security: JSS is not configured
    network: Connecting https://javadl-esd-secure.oracle.com/update/baseline.version with proxy=HTTP @ FWR200/192.168.0.246:8080
    
  • After the shutdown hook is started, the application seems to be still running, and I see exceptions like these in the log:

    2012.11.13 16:20:07.171 | def.pR.run:1639 | class java.lang.NullPointerException : null
        sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
        java.security.AccessController.doPrivileged(Native Method)
        sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
        sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)        
        ... // so on, the exception seems to happen in completely regular app code
    
  • And finally, there was no such problem until those Citrix servers started using Java 7 (specifically, java 7 update 9) instead of Java 6. Downgrading java doesn’t seem to be an option.

I’m completely lost here. Can somebody at least give me some pointers about solving this problem? What could be the cause? Is there a way to work around these issues?

  • 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-06-14T10:48:54+00:00Added an answer on June 14, 2026 at 10:48 am

    First, I hope you are authenticating the downloaded application properly before running it (by downloading it over SSL or by verifying it using a digitial signature in which case you might as well sign the jar).

    To the problem. It could easily be because youre are running in the applet JVM. The lifecycle of the applet jvm is determined by the browser. So, if you still want to use an applet as the launcher then insert some debugging output in the Applet.destroy(), Applet.stop() methods of your applet subclass and see if that is related to the shutdown.

    Another solution could be to launch it using Java Webstart. It really is the best way to launch java applications from the web.

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

Sidebar

Related Questions

I have a strange problem that I can't get my head around: I have
I have an extremely strange Problem, while trying to develop for android on eclipse
I have an extremely strange bug. I have two applications that communicate over TCP/IP.
I have extremely strange problem, which drives me crazy all day. I have a
This is extremely strange, and I'm hoping someone will have some insights to make
I have an extremely simple page that I'm trying to view in the Facebook
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
Forgive me, I'm new to Java and have an extremely basic question. I have
I'm extremely new to JS and have this code that I'm trying to tweak.
I'm having an extremely strange problem with ant. This snippet produces a set of

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.