File: java-vm

package info (click to toggle)
java-virtual-machine-dummy 0.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 60 kB
  • ctags: 2
  • sloc: sh: 47; makefile: 39
file content (53 lines) | stat: -rw-r--r-- 841 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh

repository=/usr/share/java/repository
conf=/etc/java-vm

java=`head -1 $conf`

if [ ! -n "$java" ]
then
	echo "Cannot find a Java virtual machine in $conf"
	exit 1
fi

defclasspath=`head -2 $conf | tail -1`

if [ -n "$defclasspath" ]
then
    MYCLASSPATH=${defclasspath}
fi

compliant=`head -3 $conf | tail -1`

if [ "xx$compliant" != "xxCOMPLIANT" ]
then
    if [ -n "$MYCLASSPATH" ]
    then
        MYCLASSPATH=${MYCLASSPATH}:$repository
    else
        MYCLASSPATH=$repository
    fi
fi

if [ -n "$CLASSPATH" ]
then
    if [ -n "$MYCLASSPATH" ]
    then
        MYCLASSPATH=${MYCLASSPATH}:${CLASSPATH}
    else
        MYCLASSPATH=${CLASSPATH}
    fi
fi

if [ -n "$MYCLASSPATH" ]
then
    CLASSPATH=$MYCLASSPATH
    export CLASSPATH
    #echo $CLASSPATH
fi

exec "$java" "$@"

echo "Cannot run $java (found in $conf)"
exit 1