chess/src/main/java/com/oracle/chess/client/htmljava/Main.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 24 Sep 2013 22:20:24 +0200
branchchess
changeset 49 945fbfff28f3
permissions -rw-r--r--
Advanced version of the chess game
jaroslav@49
     1
/**
jaroslav@49
     2
 * The MIT License (MIT)
jaroslav@49
     3
 *
jaroslav@49
     4
 * Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@49
     5
 *
jaroslav@49
     6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
jaroslav@49
     7
 * of this software and associated documentation files (the "Software"), to deal
jaroslav@49
     8
 * in the Software without restriction, including without limitation the rights
jaroslav@49
     9
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
jaroslav@49
    10
 * copies of the Software, and to permit persons to whom the Software is
jaroslav@49
    11
 * furnished to do so, subject to the following conditions:
jaroslav@49
    12
 *
jaroslav@49
    13
 * The above copyright notice and this permission notice shall be included in
jaroslav@49
    14
 * all copies or substantial portions of the Software.
jaroslav@49
    15
 *
jaroslav@49
    16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
jaroslav@49
    17
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
jaroslav@49
    18
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
jaroslav@49
    19
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
jaroslav@49
    20
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
jaroslav@49
    21
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
jaroslav@49
    22
 * THE SOFTWARE.
jaroslav@49
    23
 */
jaroslav@49
    24
package com.oracle.chess.client.htmljava;
jaroslav@49
    25
jaroslav@49
    26
import net.java.html.boot.BrowserBuilder;
jaroslav@49
    27
import org.apidesign.bck2brwsr.core.JavaScriptOnly;
jaroslav@49
    28
jaroslav@49
    29
public final class Main {
jaroslav@49
    30
    private Main() {
jaroslav@49
    31
    }
jaroslav@49
    32
jaroslav@49
    33
    @JavaScriptOnly(name = "main", value = "null")
jaroslav@49
    34
    public static void main(String... args) throws Exception {
jaroslav@49
    35
        BrowserBuilder.newBrowser().
jaroslav@49
    36
            loadPage("pages/index.html").
jaroslav@49
    37
            loadClass(UIModel.class).
jaroslav@49
    38
            invoke("initialize", args).
jaroslav@49
    39
            showAndWait();
jaroslav@49
    40
        System.exit(0);
jaroslav@49
    41
    }
jaroslav@49
    42
}