forked from eisop-plume-lib/plume-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava-cygwin
More file actions
executable file
·33 lines (30 loc) · 726 Bytes
/
java-cygwin
File metadata and controls
executable file
·33 lines (30 loc) · 726 Bytes
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
#!/bin/bash
#
# A wrapper for calling Java from Cygwin.
# Tries to convert any arguments that are Unix-style paths into
# Windows-style paths. This includes any arguments to classpath or
# Xbootclasspath or any arguments that begin with / .
#
# ME="$(basename "$0")"
JAVA_EXEC="${JAVA_HOME}/bin/java"
ARGS=""
while [ -n "$1" ]; do
arg="$1"
shift
case "$arg" in
-cp | -classpath)
arg="$arg' '$(cygpath -p -w "$1")"
shift
;;
-Xbootclasspath*:*)
arg="${arg%%:*}:$(cygpath -p -w "${arg#*:}")"
;;
/*)
arg="$(cygpath -p -w "$arg")"
;;
esac
ARGS="$ARGS '$arg'"
done
eval "set -- $ARGS"
#echo "$JAVA_EXEC" "$@"
exec "$JAVA_EXEC" "$@"