Bill Janssen wrote:
| Is there some way,
| from Java, to make my application the "active" application?
I replied:
| If your application will run only on OS X, you could exec() the "open"
| command. (That would require your application knowing it's own name and
| location, however.)
Bill Janssen wrote:
| Yes, I think a Mac OS X solution is what I need for now (though it
| would be nice if the Java SDK had something like this).
|
| I see that somewhere there's a class called
| "com.apple.cocoa.application.NSApplication", which has a method
| "activateIgnoringOtherApps", which sounds like exactly what I want.
|
| [URL omitted]
|
| But I can't find a jar file on my system that includes this class.
There isn't one. The Cocoa classes are in loose class files, in /System/Library/Java.
If you take that route, keep in mind that Apple has never stated that Cocoa classes can be safely used in a program that isn't a Cocoa program. They may work. They may not. They may work now, and fail two weeks from now. They may work now, and fail when 10.3.7, or Java 1.4.2 Update 3, is released. You play at your own risk. "Open" will continue to work, unless Apple eliminates the "open" command, which is rather unlikely.
Glen Fisher
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden