java

recent posts related to java, jdbc, spring, etc.

Java exec - execute system processes with Java ProcessBuilder and Process (part 1)

I've been thinking about rewriting my old article on how to execute system processes from a Java application for a while now (Running system commands from Java applications), but it's a topic that quickly becomes complicated if you want to do it right, so I kept postponing it until I could give it some quality time in a real-world project.

I've finally had an opportunity to test this in a real-world Java application on a current project, so while I'm still not finished with this, I thought I'd share what I've learned so far.

Java software license manager libraries

To help supplement my income, I've been thinking about creating some Java-based shareware applications. As I started thinking about software to time-out my application after 10 or 15 days, and requiring a license to use the software after that initial trial period, I've started down the rabbit hole of Java software license managers.

How to make your Java/Swing application look like a native Mac OS X application

I'm sorry that I don't have this other Mac/Java article into the Drupal CMS here, but I will try to get that corrected somewhere down the road. In the meantime, here are links to each section of this complete "How to make your Java application look and feel like a Mac OS X application tutorial":

A Mac Java ApplicationAdapter class example

Before I get too far away from all of this Java/Swing/Mac GUI code, I thought I'd share this Mac Java ApplicationAdapter class implementation. It's basically a sample implementation of Apple's ApplicationAdapter class, which itself is a stub implementation of their own ApplicationListener interface.

Java, Mac OS X, and the Preferences menu item

I wrote a longer Java/Mac/Swing tutorial yesterday titled "Handling the Java on Mac OS X About, Quit and Preferences menu events", but if you're just interested in handling the Mac OS X Preferences menu item in a Java/Swing application, here's a shorter version of that information.

Hide Mac Desktop clutter with DesktopShield (free)

I wrote a very small "Java on Mac OS X" application that I'd like to share here today. This one is a little different, so let me explain the problem.

I've found that using Mac OS X is different from using Windows, in that with Mac applications, I almost never use them in full-screen mode. Typically they occupy 1/2 or 2/3 of my over screen, and then I have to see my Mac Desktop behind the application window. I actually prefer everything about this approach except for one thing: My Desktop is usually very cluttered, and I don't like to see that clutter while I'm working.

The Java on Mac OS X About, Quit and Preferences menu items and events

When writing Java GUI code for the Mac OS X platform, you'll want to properly handle the Mac About, Quit, and Preferences menu items and events. Fortunately doing this is very simple, and I'll demonstrate that in this "Java on Mac OS X" tutorial.

A SwingUtilities invokeLater example

I wanted to write a nice SwingUtilities invokeLater example, but the code I have to share is a little too complicated. Fortunately I ran into the following example in the terrific book "Filthy Rich Clients" (see the link below), and it's so good and simple that I'm sharing it here.

Java - execute a system command pipeline (pipe)

In earlier articles I've described how to execute system commands from Java applications. A long time ago I wrote my first article on this topic (How to execute system commands from Java), and more recently I wrote an updated version of that article titled "Executing system commands from Java using the ProcessBuilder and Process classes".

Given that introduction -- if you're interested in learning how to execute a Unix or Linux system pipeline (pipe) command from a Java application, you're in the right place.

A Java KeyStroke, KeyEvent, Action, InputMap, and ActionMap example

I don't know if this is the "proper" way to handle having multiple keystrokes for one action, but until I find a better approach I thought I'd share this here.

Syndicate content