вторник, 11 октября 2011 г.

Test Casual 1


public class TestClass {

    Integer num1 = null;
    Integer num2 = null;

    public TestClass(Integer num1, Integer num2) {
        this.num1 = num1;
        this.num2 = (num2 != null && num2 < 1) ? 10 : num2;
    }

    public static void main(String[] args) throws Exception {
        TestClass test1 = new TestClass(0, 0);
        System.out.println("test1=" + test1.num1 + " " + test1.num2);

        TestClass test2 = new TestClass(null, 0);
        System.out.println("test2=" + test2.num1 + " " + test2.num2);

        TestClass test3 = new TestClass(0, null);
        System.out.println("test3=" + test3.num1 + " " + test3.num2);
    }
}

среда, 13 апреля 2011 г.

Install (Uninstall) JDK (JRE). Error 1723.

Деинсталяция JDK (JRE) приводило к ошибке Error 1723.

Run:
jdk-6u24-windows-i586.exe /LV* %TEMP%\jreMSI.log

Result:
file MSIeae8f.LOG:
Error 1723.There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action uninstallsdk, entry: MSIUninstallSDK, library: C:\Java\jdk1.6\jre\bin\regutils.dll

file jreMSI.log:
=== Logging stopped: 13.04.2011 10:44:42 ===
MSI (c) (C4:CC) [10:44:42:839]: Note: 1: 1729
MSI (c) (C4:CC) [10:44:42:954]: Product: Java(TM) SE Development Kit 6 Update 24 -- Configuration failed.

MSI (c) (C4:CC) [10:44:43:249]: Windows Installer reconfigured the product. Product Name: Java(TM) SE Development Kit 6 Update 24. Product Version: 1.6.0.240. Product Language: 1033. Manufacturer: Oracle. Reconfiguration success or error status: 1602.

MSI (c) (C4:CC) [10:44:44:565]: Grabbed execution mutex.
MSI (c) (C4:CC) [10:44:44:565]: Cleaning up uninstalled install packages, if any exist
MSI (c) (C4:CC) [10:44:44:566]: MainEngineThread is returning 1602
=== Verbose logging stopped: 13.04.2011 10:44:44 ===

Solving:
Копировать папку jre\bin с другого компьютера и повторить деинсталяцию (использовал JDK 6 Update 18).