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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:52:38+00:00 2026-06-05T05:52:38+00:00

I created a Java desktop-application (using Swing) and am now trying to make it

  • 0

I created a Java desktop-application (using Swing) and am now trying to make it work by starting it from the net using JNLP. The application works fine when I start it from the terminal, but as soon as I launch it from JNLP, it does not close. I have to manually kill the process every time.

I read that there might be a problem if my JFrame uses DISPOSE_ON_CLOSE as the default close-operation, but it doesn’t. It uses DO_NOTHING_ON_CLOSE (implicitly). Also, I’m explicitly calling System.exit(0) after releasing all my objects:

f = new JFrame("Pacman");
f.addWindowListener(new WindowAdapter() {
    @Override
    public void windowClosing(WindowEvent e) {
        // Terminate the Game-loop:
        GameLoop.INSTANCE.stopLoop();
        // Close the application:
        System.exit(0);
    }
});

I guess that there might be an exception thrown when I close the application, but I can’t find a way to get the console-output (e.g. the Stack-Trace) of a running application started with JNLP. Here’s what I tried:

  • Start javaws with the debugging parameters and connect with jconsole (works but I can’t find any exception- or console-ouput).
  • Start javaws with the debugging parameters and attach IntelliJ debugger to it (also works but does not give me any output)

So, how can I start the application with JNLP and get the output (written to the default out- and error-streams), as if I would do with a normal desktop application?

  • 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-05T05:52:39+00:00Added an answer on June 5, 2026 at 5:52 am

    Solution #1 – Enable Java Console, and look for exceptions.

    You can do it via Java Control Panel. Switch to Advanced tab, and in the Java Console make sure Show console is selected.

    Then, run your application and monitor the console for exceptions. Fix the exception.

    Solution #2 – Debug your running application (properly).

    Start the Web Start app like this (for Java 1.6 and newer):

    javaws -verbose -J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=8123 http://myserver.com/path/to/myapp.jnlp
    

    If using earlier java versions (1.4.2, 1.5) set the environment variable, like this:

    set JAVAWS_VM_ARGS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=8123"
    

    and run the app via:

    javaws http://myserver.com/path/to/myapp.jnlp
    

    When the app runs:

    1. Attach a debugger (Eclipse will do – use Run => Debug Configurations => Remote Java Application, and in Connection Properties panel enter the port passed in the parameters to javaws (in this case: 8123).
    2. Set a breakpoint inside your windowClosing method.
    3. Try to close your application – Eclipse should break the execution on your breakpoint
    4. Step into the GameLoop.INSTANCE.stopLoop() method to see where/when it hangs.

    Don’t expect to see a solutions in the console, just step through the code with a debugger – if the application hangs, it will show you where.

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

Sidebar

Related Questions

I m trying to create a desktop application using swing in java, which allows
In a desktop application created using java and spring, the GUI forms are created
I'm trying to create image from SQLite database in Java Swing application. But it
I'm trying to make a Flex-based desktop application consume messages from an ActiveMQ topic
I've created a stand alone java desktop application using Netbeans. I want a way
I have been using Netbeans for my java desktop application since few months. Now
I'm trying myself developing a desktop application with Java and Java Swing. Currently I'm
I'm developing a console Java application(Not swing) using java.awt.Desktop class, which will launch the
In the Java Desktop Application template used by Netbeans, a menu bar is created
I've created a NetBeans Platform application that is launched using Java Web Start. I

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.