I’m so addicted to 2048 and I decided to write it in Java. I combined all algorithms and approaches I found on Github and the Internet, and I finally have the game in just one java file. You can find sources here: https://github.com/bulenkov/2048

First screenshot was made with Apple JDK. Quartz Graphics Framework enabled by passing apple.awt.graphics.UseQuartz=true as a system property to render text and graphics. Anyway, fonts and colours under Apple JDK with Quartz look so different in java applications comparing to native ones. The good news is that fonts look natively with new Oracle JDK. It uses new approaches to render texts. Unfortunately, OpenGL doesn’t support SubPixel anti-aliasing, so you can have some problems with non-Retina displays.

Also Apple JDK with Quartz modifies colours while rendering and makes them more soft and warm. Look at the difference in backgrounds on the pictures. They have the same background colour… sort of…

A few days ago I installed Oracle JDK (version 1.7.0_40) built especially for early access purposes. So, it’s not the final release. The build contains tons of bug fixes and backports from JDK 8 for AWT/Swing and that was the main point why I started to play with it. As you might have heard, Retina support was one of the major issues in all 1.7.* releases. I’d say there was no Retina support before the build 1.7.0_40. I’m going to show you some differences of Retina support in Apple and Oracle JDKs.

1. isRetina() method

That’s funny, but there is no public API for it in Oracle JDK 7. Here is how we (IntelliJ IDEA team) do it under Apple JDK:

Great news! I recently uploaded initial version of Redline Smalltalk plugin for IntelliJ IDEA. What is Redline Smalltalk? Redline Smalltalk is a Smalltalk for JVM. This literally means you write Smalltalk code and run it using JRE and Redline library. I’ve made it available from your favorite Java IDE IntelliJ IDEA.

What’s in version 1.0?

Create a Redline Smalltalk project using IntelliJ wizard

Import a Redline Smalltalk project from an existing project

Adding Redline Smalltalk support to an existing module

Adding Redline Smalltalk module to an existing project

Creating a new Smalltalk file based on two templates: class and message

Create a Redline Smalltalk run configuration

Ability to compile and run Redline Smalltalk from IntelliJ

Run output console

Ability to download and install Redline Smalltalk from the Module Wizard

A few days ago I had a problem: run YouTrack on my VDS. YouTrack is a bug tracker written in Java. First time I run it as

java -jar youtrack.jar 8080 &

And this worked fine, until I closed my ssh session with the server. When you close a ssh session your terminal send the HUP (hangup) signal to warn all depending processes of logout. To avoid the HUP signal to be sent, run your java programs using hohup:

Every time I setup a new Mac OS X virtual machine with Java on board I can’t find java sources (src.zip or src.jar files). Here is a short instruction how to setup JDK with the sources and documentation on Mac OS X.

Unicode is a major feature which Java supports perfectly. This means you can use ANY unicode symbols in your code. Arrow symbols are quite useful. Here is so-called “The Unicode Arrows Block” with characters codes. To use arrow symbols in a Java application just write something like this: