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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:35:36+00:00 2026-05-31T01:35:36+00:00

I’m writing a utility to help with testing a much larger system, and my

  • 0

I’m writing a utility to help with testing a much larger system, and my UI doesn’t show up at all if I run it through the system. It works fine when I run it myself. More details:

  1. The system I’m testing has many processes, managed by a controller. When deployed, controller.exe spawns and terminates child processes, including my java app. When launched by the controller, my app runs fine (does work, generates logs, etc.) but the Swing UI doesn’t render at all.
  2. I can launch my app myself from the command line, and the UI shows up just fine. According to Process Explorer, the Path, Command Line, and Current Directory are all identical to the values observed when the app is launched from the controller.
  3. When the app is invisble, clicking “Bring to Front” in Process Explorer pops a dialog that says. “No visible windows found for this process.” Clicking the same button on the manually spawned process brings the Swing UI to front as expected.
  4. I’m testing this in Windows XP. The controller process runs under SYSTEM. I used the “at 09:45 /interactive cmd.exe” trick to spawn a command prompt as SYSTEM for my manual launch. Process Explorer verifies that both methods (manual / controller) spawn the java process as SYSTEM.
  5. The only obvious difference between the two processes are the parents. The system process spawns as a child of controller.exe, while my manual executions are a child of cmd.exe.
  6. I have remotely debugged into the invisible process using using jdwp, and everything looks normal. The UI code executes, no exceptions are thrown, and my JLists are even getting populated with the data they monitor. As far as I can tell, everything works; I just can’t see any of it.

I apologize if this has been answered elsewhere. I did my best to search around, but all the questions I could find are about certain components failing to render, never a failure of the entire app to display.

Thanks!

Edits:
Based on feedback, I’ve swapped in a demo program that’s as small as possible. Here’s the entire code:

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;

public class AceProbe
{
  public static void main(String[] args)
  {
    SwingUtilities.invokeLater(new Runnable()
    {
      @Override
      public void run()
      {
        JFrame frame = new JFrame("Visible?");
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.getContentPane().add(new JLabel("Test"), BorderLayout.CENTER);
        frame.pack();
        frame.setVisible(true);
      }
    });
  }
}

Running this from the command line displays the window as expected. However, when the controller spawns the process, nothing displays. When spawned by the controller, I can debug into the process remotely using -agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=8000 and verify that all of the threads are spawning as expected, and that no exceptions are thrown.

My intuition from here is that controller is in some odd graphics configuration and, since is parents the new java process, maybe Swing is not using the correct GraphicsDevice? I tried adding this code:

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
for(GraphicsDevice d : ge.getScreenDevices())
{
  Log.println(d);
  for (GraphicsConfiguration c : d.getConfigurations())
  {
    Log.println(c);
    Log.println(c.getBounds());
  }
}

The log contains this:

Win32GraphicsDevice[screen=0]
sun.awt.Win32GraphicsConfig@13f459d[dev=Win32GraphicsDevice[screen=0],pixfmt=0]
java.awt.Rectangle[x=0,y=0,width=1920,height=1080]

which seems to indicate there’s only one device with one config, so I’m at a bit of a loss.

  • 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-31T01:35:38+00:00Added an answer on May 31, 2026 at 1:35 am

    The solution is to split the app into 2 components (data gathering and ui/processing) and have them communicate via RMI.

    It turns out that Windows services cannot spawn GUIs. I did some sc querying and discovered that controller.exe is a service. Since it parents the java process, java gets the same service permissions, which means no gui. There are some workarounds, but they exist for backwards compatibility and really should be avoided in new code.

    It is important to reiterate that java didn’t raise any exceptions. It seems like this situation should throw something to indicate that the java process doesn’t have permission to create new windows, but the code runs “normally.” The window just never appears.

    Bottom line: if another process is launching your vm, and you get no errors but no ui, check to make sure your vm isn’t launching as a service. If it is, you’ll need to extract ui code into a separate process.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I am writing an app with both english and french support. The app requests
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to loop through a bunch of documents I have to put
I have just tried to save a simple *.rtf file with some websites and

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.