#!/bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#

{
    echo <RAD_JAVA_DIR>/rad.jar
    echo <RAD_JAVA_DIR>/pam.jar
    echo <RAD_JAVA_DIR>/config.jar
    echo <RAD_JAVA_DIR>/container.jar
    echo <RAD_JAVA_DIR>/control.jar
    echo <RAD_JAVA_DIR>/errors.jar
    echo <RAD_JAVA_DIR>/files.jar
    echo <RAD_JAVA_DIR>/kstat.jar
    echo <RAD_JAVA_DIR>/modules.jar
    echo <RAD_JAVA_DIR>/network.jar
    echo <RAD_JAVA_DIR>/panels.jar
    echo <RAD_JAVA_DIR>/smf_old.jar
    echo <RAD_JAVA_DIR>/time.jar
    echo <RAD_JAVA_DIR>/usermgr.jar
    echo <RAD_JAVA_DIR>/zonemgr.jar
    echo <RAD_JAVA_DIR>/zonesbridge.jar

    /usr/bin/gfind '<VP_DIR>/app' \
        -mindepth 1 -maxdepth 1 -type f -iname '*.jar'
    /usr/bin/gfind '<VP_DIR>' \
        -mindepth 1 -maxdepth 1 -type f -iname '*.jar'
    /usr/bin/gfind '<VP_LOCALE>' \
        -mindepth 2 -maxdepth 2 -type f -iname '*.jar'
} | /usr/bin/paste -sd: - | read CLASSPATH

export CLASSPATH

exec /usr/jdk/instances/jdk1.8.0/jre/bin/java \
    -Djava.security.policy='<JAVA_POLICY>' \
    com.oracle.solaris.vp.client.swing.App "$@"
