Replacing OpenJDK with JRE 6 in Arch Linux


In Arch Linux Wiki page, it mentioned that OpenJDK is nearly perfect which we need not to install Oracle proprietary Java. But sadly to know, there are some Java applet which needs Java Runtime Environment version 6 instead of 7. That means, neither OpenJDK nor Oracle proprietary Java 7 works.

Therefore, I need to replace the jdk7-openjdk, jre7-openjdk, and jre7-openjdk-headless with AUR jre6 and jdk6. Besides that, icedtea-web-java7 is also no needed.

However, in Arch Linux, if doing replacement, that means we need to remove the unwanted packages. Removing the packages, because of the dependencies, all the other packages depend on them will also need to be removed. Yet, this problem can be solved with some tricks in pacman,

sudo pacman -Rndd jdk7-openjdk jre7-openjdk jre7-openjdk-headless icedtea-web-java7 java-rhino
#Use -dd to ignore dependencies check

As a result, only those packages will be removed. The other packages depend on them will not be removed, such as jedit. By this, we can install the jre6 and jdk6 after that.

Besides that, we can check whether missing dependencies with “testdb” command from pkgtools package. It will be helpful if we remove some of the packages without dependencies check.

Now, the Java applet is working.

Advertisements

JDownloader Chinese or Japanese characters problem in Linux


When downloading the files contain Chinese or Japanese characters using JDownloader in Linux (for my case, Arch Linux), I found that all the Chinese or Japanese characters are shown with boxes. There are a lot of suggested solutions I found from Internet, especially adding !font=Dialog to the language file. I also tried to edit the fontconfig.properties file, adding path to JAVA_FONTS, etc. But all the solutions do not work.

So, my solution is, just change the user interface style to non-Synthetica style, eg, Substance or Light. Both types of style work well, allow me to see the file names with correct characters. Problem solved.

Please note that, this is not the fault of Synthetica (Synthetica FAQ).

Running Mono (C#) pre-compiled by Linux in Windows


Finally, I success to run Mono with GTK# pre-compiled by Linux in Windows.

Firstly, make sure Windows is installed with

With the above installation, one can run the Mono application normally. I failed previously because I didn’t install GTK# for .NET.

However, when I run the application, there is a console window, which is annoyance. Thus, build the Mono application with

gmcs yoursource.cs -pkg:gtk-sharp-2.0 -target:winexe

By using “-target:winexe”, there will be no console window.

Yes, this is a light for me for cross-platform software development. Though I haven’t tried this on Mac OS X, but hopefully it works. I found that Mono is better than Java. Mono GTK# unlike Java Swing which cause me a lot of troubles. Java Swing though can run in cross-platform, it produces unexpected GUI differences. (Such as running GridBagLayout of Java in Ubuntu. One can give a try with Password Cipher Java Edition). I think I will move to Mono with GTK# instead of Java.