Muhammad Saifuddin wrote:Try this short key Ctrl+Shift+O.
This will organize imports meaning only import packages used by class.
Martin Vajsar wrote:In Windows, there are some convoluted rules concerning application windows after launch, but I believe they govern focus, not visibility. However, if your updater application quits immediately after starting up the main app, it might influence things. Delaying the exit by a few seconds long sleep() after that just to see what happens cannot hurt.
When you run the application from command line, does it show up nicely? Does it behave the same on all computers?
Martin Vajsar wrote:Try to replace that code with this:
Let's see whether it changes anything.
Martin Vajsar wrote:Maybe you could show us how do you run the bat file (I mean the code you use in updater.jar)? I'd say that you should be able to get rid of the bat file and run java (or javaw) directly from your updater application. It might help resolve the issue.
I also understand that the window of your application is not visible anywhere: taskbar, Alt-Tab list, Task Manager Applications tab (just in processes). Is this the case?
Also, I assume your main application is a Swing app. Do you initialize all Swing objects on an Even Dispatch Thread (using SwingUtilities.invokeLater and all that)? It kind of seems that the window of your application exists, but is hidden.
Rob Spoor wrote:First of all, on Windows you have to use \ instead of / inside batch files and other commands. Java is lenient with java.io.File but Windows itself isn't.
If it's a windowed application you may want to use javaw.exe instead of java.exe. This will not show the command window.