Posts Tagged ‘Java’

Eclipse & Windows 64-Bit: Resolve “Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available…” and “Java was started but returned exit code= 13…”

It’s been a while I’ve set up Eclipse the last time and today I tried to run Eclipse (“Eclipse Classic 4.2.1 / 64 Bit” downloaded from here to be precise) on my fresh installed Windows 8. After extracting the zip folder and starting eclipse.exe I got the error message: Java Runtime Environment (JRE) or Java […]

Read more…

Ubuntu 12.04.1 LTS & ant: Resolve “Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar”

I recently got the following error when I tried to run ant on a fresh installed Ubuntu 12.04.1 LTS machine: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar The solution was to install the openjdk-6-jdk package as follows: #sudo apt-get install openjdk-6-jdk#sudo apt-get install openjdk-6-jdk Hope this helps somebody…

Read more…

Java: Test if String matches wildcard expression

The following Java method tests if a string matches a wildcard expression (supporting ? for exactly one character or * for an arbitrary number of characters): /** * @param text Text to test * @param pattern (Wildcard) pattern to test * @return True if the text matches the wildcard pattern */ public static boolean match(String […]

Read more…

Windows: Android SDK installer does not find Java SE Development Kit (JDK)

Update 2011-06-25: As suggested in the comments just clicking back button and then next again in the installer could bypass the problem. Thanks to Hatem and tikno07. I was trying to install the Android SDK tools using the Windows installer package recently. Since I had the Java JDK SE 6 Update 23 installed on my […]

Read more…

Ubuntu 10.04 & Java: Setup Sun JDK

Since Ubuntu 10.04 the OpenJDK is the recommended default JDK and the Sun JDK has been removed from the multiverse repository. From the release notes: Sun Java moved to the Partner repository For Ubuntu 10.04 LTS, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive. It is recommended that you […]

Read more…

Hibernate & UserType: How to persist JSON objects

A Hibernate UserType defines a (custom) way how to save Java objects into the database. Basically, it defines how the object is serialized to be persisted in the database and how the object is (re)created from the serialized data stored in the database. Here is a UserType that I’ve written to persist objects of type […]

Read more…