Japanese input for Sun Java 1.4 on Windows

This tutorial explains how to setup and configure a japanese input method for Java 1.4 applications on Windows for usage with CGoban2 and gGo.

Authors: Peter Strempel, William Shubert

Introduction

There are various input methods for japanese, chinese, korean or other languages. For the Microsoft Windows the most commonly used system is Microsoft IME. Japanese users will be familiar with this input method.

Java 1.3 is able to fully integrate and use Microsoft IME, while the recent Java 1.4 does not support it. This poses a problem as Java 1.3 is getting outdated and software developers generally recommand their users to run applications on Java 1.4. However, users who want to use a japanese input method were forced to stay on Java 1.3 and integrate the Microsoft IME.

Java 1.4 offers the ability to develop native Java input methods. The advantage is, those input methods are not platform depending and will run on all operating systems that support Java. However, currently a native Java input method is unknown to the authors of CGoban2 and gGo. William Shubert has therefor written a simple japanese input method to fill the gap and offer japanese users a way to input japanese characters running Java 1.4 on Windows.

System font configuration

If your Windows system is not yet configured to display japanese fonts, you need to install the japanese language pack. This tutorial covers the installation on Windows 2000.

Open the language settings dialog in the system control panel.

In the first tab you find a list of language packs.

Enable Japanese in the lower part and hit Ok. The upper part is not relevant, leave that at your default settings. You will need to insert your Windows 2000 CDROM for the installation. After that you are prompted for a reboot.

After the reboot japanese fonts are available.

Configure Java to use japanese fonts

Open your Java installation directory. This is usually in a folder like C:\Program Files\Java\j2re1.4.1\ or similar. Open the folder folder lib there and you will find a list of files named font.properties.XX.

font.properties is used for the current configuration.

Rename font.properties to font.properties.orig or copy it elsewhere. Then rename font.properties.ja to font.properties. This will tell Java to use the japanese fonts you installed before.

When you start CGoban2 or gGo now, you should be able to see japanese characters.

Download

You require the follow file which includes the japanese input method: nihonIM.jar

Install nihonIM.jar input method

Simply copy the file nihonIM.jar into the folder C:\Program Files\Java\j2re1.4.1\lib\ext.

Restart CGoban2 or gGo again if it is still running

Selecting the input method

Now if everything is installed, you can select the input method from a windows system menu.

Select Nihon IM for japanese input.

Your text input within this window will now be japanese. Use Cursor-Up to set the current text to Hiragana (the default) and Cursor-Down to set it to katakana. Space commits all text up to the current cursor.

The input method is currently very simple and not complete.

Questions?

For further comments, suggestions and questions please feel free to contact Peter Strempel (gGo, installation and usage questions) and William Shubert (CGoban2, japanese input questions).

Improving the input method

If you know about Java and japanese input methods, please feel free to have a look at the sourcecode. If you know about any useful changes or improvements, please let us know.


Copyright (C) 2003, Peter Strempel and William Shubert