Posts

Showing posts from January, 2018

To check your version of Java

To check your version of Java java -version in a console (command prompt). On Windows 7 with 64-bit Java 6 I get: java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode) Note the 3rd line, which shows that this is a 64-bit version. On a 32-bit version you'll get something like: Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

GUID Conversion

The conversion methods: public static String convertGuidToDbFormat (String guid) { String s1 = guid.substring(1, 3); String s2 = guid.substring(3, 5); String s3 = guid.substring(5, 7); String s4 = guid.substring(7, 9); String s5 = guid.substring(10, 12); String s6 = guid.substring(12, 14); String s7 = guid.substring(15, 17); String s8 = guid.substring(17, 19); String s9 = guid.substring(20, 24); String s10 = guid.substring(25,37); return s4+s3+s2+s1+s6+s5+s8+s7+s9+s10; } public static String convertGuidToWorkplaceFormat (String guid) { String s1 = guid.substring(0, 2); String s2 = guid.substring(2, 4); String s3 = guid.substring(4, 6); String s4 = guid.substring(6, 8); String s5 = guid.substring(8, 10); String s6 = guid.substring(10, 12); String s7 = guid.substring(12, 14); String s8 = guid.substring(14, 16); String s9 = guid.substring(16, 20); String s10 = guid.substring(20); return “{” + s4 + s3 + s2 + s1 + “-” + s6 + s5 + “-” + s8 + s7 + “-” + s9 + “-” + s10 + “}”; } else i...