wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Program.launch of Mac OSX TextEdit can cause problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Program.launch of Mac OSX TextEdit can cause problems" Watch "Program.launch of Mac OSX TextEdit can cause problems" New topic
Author

Program.launch of Mac OSX TextEdit can cause problems

Jeff Barnard
Greenhorn

Joined: Nov 24, 2008
Posts: 11
My SWT application has been used in both Windows XP/Vista/7 and Mac OSX for several years.

Recently, in certain org.eclipse.jface.action.Action classes I've added the option to open *.txt files (these are newly created operational reports). The files are opened by calling org.eclipse.swt.program.Program.launch(fileName), where fileName is the full path name for a particular *.txt file.

In Windows, there are no issues with this scenario.

In Mac OSX, if the user first launches the text-related program (e.g., TextEdit) before launching my SWT application, there are no issues with this scenario.

In Mac OSX, if the user first exits the text-related program (e.g., TextEdit) launched by my SWT application before attempting to exit my SWT application (via menu's "Quit", etc.), there are no issues with this scenario.

In Mac OSX, if the users does not exit the text-related program (e.g., TextEdit) launched by my SWT application before attempting to exit my SWT application, my SWT application's window closes... but the icon is left behind in the Dock (a.k.a., system taskbar) and my SWT application has not actually exited. I have to manually terminate my SWT application via Force Quit.

Any suggestions about this problem would be welcome.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Program.launch of Mac OSX TextEdit can cause problems
 
Similar Threads
What is the proper way to exit a Java application?
Whizlabs virus alert ??
Mac GUI fails 30 percent of the time, debugging, and swing Vs AWT
Starting wth Java on Mac
Java SDK on Mac OSX