SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
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.
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.
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.
Martin Vajsar wrote:Try to replace that code with this:
Let's see whether it changes anything.
terr lundamo wrote:Could it have anything to do with whether updater.jar manages to close itself before the main app starts up?
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?
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|