Archive for the tag 'Java'

GCALDaemon: Sync your Google Calendar

GCALDaemon [1] is an OS-independent Java program that offers two-way synchronization between Google Calendar [2] and various iCalendar compatible calendar applications. GCALDaemon is primarily designed as a calendar synchronizer but it can also be used as a Gmail notifier, Address Book importer, Gmail terminal and RSS feed converter.

GCALDaemon is released under Apache License version 2.0.

[1] http://gcaldaemon.sourceforge.net
[2] http://www.google.com/calendar/

SLF4J – Simple Logging Facade for Java

The Simple Logging Facade for Java or (SLF4J) [1] serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time.

SLF4J source code and binaries are distributed under the MIT license.

[1] http://www.slf4j.org/

jcouchdb – Java5 couchdb driver

jcouchdb [1] is a java5 couchdb driver using the svenson JSON library.

It offers features to support the full range from totally dynamic parsing to parsing into concrete java POJOs, including a mix in between.

jcouchdb is in the early stages of development but there’s a test suite proving that it does at least most of the couchdb operations.

Jcouchdb is released under BSD license.

[1] http://code.google.com/p/jcouchdb/

jOpenDocument: OASIS Open Document in pure Java

jOpenDocument [1] is a free library for developers looking to use Open Document files without OpenOffice.org.

jOpenDocument is Open Source (under GPL or commercial license).

You can automate the document creation and manipulation process. You can use jOpenDocument to:

  • Generate dynamic documents from Java, XML or databases
  • Display and print files with built-in viewers
  • Split, concatenate, and manipulate pages
  • Automate filling out of template (created by OpenOffice or not)
  • Use your preferred langage via standard ScriptEngine interface
  • And much more…

[1] http://www.jopendocument.org/

Video4Linux4Java: Access Video4Linux API with Java

Video4Linux4Java [1] (v4l4j) is a GPL’d java package providing simple access to the capture interface of the Video4Linux (V4L) API from Java. Using v4l4j, an application can:

  • retrieve information about a video device, such as the number and type of video inputs, supported image formats, resolutions & video standards and available tuners,
  • capture frames from any V4L-supported devices, which includes USB/Firewire webcams, video capture cards and tuner cards.
  • access video controls, such as brightness, contrast, gain, Tilt, Focus, …
  • access and control tuners (get / set frequency, access to received signal strength, …)

[1] http://code.google.com/p/v4l4j/

Hudson: Continuous Integration System

Hudson [1] monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Hudson focuses on the following two jobs:

  1. Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Hudson provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Hudson keeps those outputs and makes it easy for you to notice when something is wrong.

Hudson can be extended by plugins and can be integrated into IDEs like Eclipse. There are also a lot of tools like for example Firefox Add on. It is written in Java (1.6) released under the MIT license.

Update
Hudson now provides Debian packages.

[1] https://hudson.dev.java.net/

Clojure: Lisp dialect for JVM

Clojure [1] is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language – it compiles directly to JVM bytecode, yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.

Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded designs.

[1] http://clojure.org/

IRCcat: Simple posting to IRC from shell scripts

IRCcat [1] does 2 things:

  1. Listens on a specific ip:port and writes incoming data to an IRC [2] channel.

    This is useful for sending various announcements and log messages to irc from shell scripts, Nagios and other services.

  2. Hands off commands issued on irc to a handler program (eg: shell script) and responds to irc with the output of the handler script. This only happens for commands addressed to irccat: or prefixed with ?. (easily extend irccat functionality with your own scripts)

It is written in Java und licensed under GPLv2.

[1] http://github.com/RJ/irccat/ and http://www.metabrew.com/article/how-we-use-irc-at-lastfm/
[2] http://en.wikipedia.org/wiki/Internet_Relay_Chat

SMSler: Sending SMS over free HTTP web services

In Switzerland, many (all?) mobile operators providing a web service for sending an amount of free SMS over their website. The only thing to do is to register a username and a password. I wanted to use this free service with my servers, so they can inform me by sending also a free SMS over HTTP if there are any problems.

There are two simular projects: SwissSMS for OS X in C# and Java Swing GUI SwissSMSCient. But I just wanted to have a small library in Java, which can be used to send SMS messages by bash scripting or building a GUI based on it, whatever you like.

So I developed a mavenized library named LibJSMS in Java licensed unter LGPL, which can be used in a shell script as following:

1
2
3
4
#!/bin/sh
# Example:
# java -cp LibJSMS-x.y.jar net.renemoser.libjsms.App <userid> <password> <phoneNumber> <message> <provider:default=SunriseCH> 
java -cp LibJSMS-0.4.jar net.renemoser.libjsms.App example@sunrise.ch secret 0761234567 "Error message..." SunriseCH

If you like to use the library in your java code, it would look like this:

1
2
3
4
5
6
7
8
import net.renemoser.libjsms.service.*;
try {
    ShortMessageService Service  = new SunriseCH();
    Service.doLogin(userid, password);
    Service.sendShortMessage(phoneNumber, message);
} catch(Exception e) {
    e.printStackTrace();
}

or by using the service factory class:

1
2
3
4
5
6
7
8
9
import net.renemoser.libjsms.service.*;
String provider = "SunriseCH";
try {
    ShortMessageService Service = ServiceFactory.getService(provider);
    Service.doLogin(userid, password);
    Service.sendShortMessage(phoneNumber, message);
} catch(Exception e) {
    e.printStackTrace();
}

At the moment, the library can only use the 2 Operators Sunrise and Orange. Because those are the 2 only accounts I had.
But the operator Swisscom or even any operator of the world could be added. I would love to the get any patches for additional operator suppport to my email address, which can be found on my contact page.

The library using Java 6 only at the moment. The most recent version of this library can always be found on my GitHub Account.

I also wanted to have a desktop GUI application for using this service. So I developed a small Java desktop application named SMSler licensed under GPLv3 using this library with Netbeans. I know you like screen shots:

You can download my first release in the download section of my GitHub account. I am also providing an exe file for windows users, build with help of launch4j. It is tested on Debian, Ubuntu and Windows XP as long as you have Java 6 installed. Mac OS X 10.5 still uses Java 5, so this won’t work unfortunately.

After starting the application, make sure you are setting up a preferences file under the “Menu File –> Perferences”. This creates a preferences file in your home directory in .smsler/main.preferences.

Feel free to send me feedback and improvements.

JSendNSCA: Nagios Passive Checks in Java

JSend NSCA [1] is a Java API and command line tool for sending Nagios [2] Passive Checks to the Nagios NSCA add on.

By using the JSend NSCA core API, you can easily integrate your Java applications into a Nagios monitored environment thereby notifying Nagios of problems and issues during the running of your application.

The Jsend NSCA CLI command line tool wraps the API and allows you to send passive checks from the command line.

Please consider: Nagios has been forked, so it is also known as Icinga.

[1] http://code.google.com/p/jsendnsca/
[2] http://www.nagios.org/

Next Page »