Skip to content

tobiassodergren/hum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Hum project is a Java 6 API for Growl utilizing its AppleScript API for OS X.

Hence to be able to use the API, the following criteria apply:

  1. You need to use Java 6.
  2. Only platforms where you can get an AppleScript script engine in Java are supported.
  3. Growl needs to be installed.

The code is verified against Growl 1.2 but may work on Growl 1.3+


How to use the API:
===================

Put the hum-1.0.jar file on your classpath.

Here's an example code:

public class HumExample {
  public static void main(String[] args) {
      if (!Hum.isGrowlSupported()) {
          System.err.println("Your system does not support Hum");
          return;
      }

      NotificationProducer notificationProducer = Hum.registerApplication("My Java application with Growl")
                  .withAvailableNotificationTypes("important", "spam")
                  .withEnabledNotificationTypes("important")
                  .initialize();

      notificationProducer.notify("important", "Hello", "There");
  }
}


About
=====

This project is a result from comments (from Magnus Robertsson and someone called yasfmi) on the blog post:
http://blog.jayway.com/2011/04/12/send-growl-notifications-on-os-x-using-a-java-6-script-engine-and-applescript/

About

Growl notifications from Java 6+

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages