Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatic access to the notification area (aka the System Tray)



That particular bug is fixed in the latest version, which you can download here:

https://jdic.dev.java.net/servlets/ProjectDocumentList? expandFolder=4183&folderID=6267

choosing the  jdic-20061102-bin-mac link.

Unzip the file and you'll get a mac_os_x folder, which contains the universal build for Mac OS X.

In the demo folder there's a README file which describes how to invoke a particular demo (use the Unix instructions.)

For the TrayIcon demo, navigate to the mac_os_x/demo/Tray directory in your shell (Terminal), then type:

java -classpath ../../jdic.jar:. -Djava.library.path=../../ Tray

Remember that the demo is designed to be run on any platform that supports JDIC (Windows, Mac, Linux), and some features are not available on all platforms, like the Balloon messages. That's why the "OK" button in the demo will give you an exception when run on the Mac. But, you can change the "Caption" field, which on Mac OS will change the text in the pop-up help when you hold the mouse cursor over the Tray Icon in the status bar.

You can single-click to bring the app to the front, and right-click to display the JMenu attached to the tray icon. Choosing any item in the menu shows the action being called in your Java app.


I ran this fine on my G4, and now on my Mac Book Pro, without any segmentation faults, so if you're still getting one there could be another bug.


Rob Ross, Lead Software Engineer
E! Networks

---------------------------------------------------
"Beware of he who would deny you access to information, for in his heart he dreams himself your master." -- Commissioner Pravin Lal



On Jul 4, 2007, at 9:36 PM, Mark Leone wrote:

On the subject of using JDIC for running Java programs from the System Tray:

Rob Ross wrote:

But, the code for Mac TrayIcon should work fine if you download it and run it from your desktop...
I downloaded the classes and integrated them into my desktop app, and discovered a bug that causes a fatal crash (Segmentation Fault). The bug is known, and the info is here: https:// jdic.dev.java.net/issues/show_bug.cgi?id=454 . A fix has been uploaded to CVS, but the platform-specific instructions for building JDIC from source don't mention OSX.

I posted a request for help on the main JDIC list, but if anyone here has OSX-specific build instructions for JDIC, or a binary distro with the aforementioned bug fix, I'd be much obliged. I'm hoping for step by step instructions, because I know next to nothing about C compilers and am not too great on Unix. I've built complex projects before from source on OSX, but only after throwing the kids out of the room, doing a couple dozen google searches, and let's just say not having a completely happy, fulfilling, and family-friendly time in front of the keyboard.

-Mark


_______________________________________________
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/rross% 40eentertainment.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Re: Programmatic access to the notification area (aka the System Tray) (From: Mark Leone <email@hidden>)
 >Re: Programmatic access to the notification area (aka the System Tray) (From: Rob Ross <email@hidden>)
 >Re: Programmatic access to the notification area (aka the System Tray) (From: Mark Leone <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.