aboutsummaryrefslogtreecommitdiff
path: root/vo/java
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /vo/java
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'vo/java')
-rw-r--r--vo/java/Aladin.jarbin0 -> 4083554 bytes
-rwxr-xr-xvo/java/aladin51
-rwxr-xr-xvo/java/app.aladin46
-rwxr-xr-xvo/java/app.hub52
-rwxr-xr-xvo/java/app.topcat46
-rwxr-xr-xvo/java/hub44
-rw-r--r--vo/java/jsamp-1.3-2.jarbin0 -> 707990 bytes
-rwxr-xr-xvo/java/topcat124
-rw-r--r--vo/java/topcat-full.jarbin0 -> 26377995 bytes
-rw-r--r--vo/java/voclient.jarbin0 -> 5477793 bytes
-rwxr-xr-xvo/java/voclientd117
11 files changed, 480 insertions, 0 deletions
diff --git a/vo/java/Aladin.jar b/vo/java/Aladin.jar
new file mode 100644
index 00000000..4162f7af
--- /dev/null
+++ b/vo/java/Aladin.jar
Binary files differ
diff --git a/vo/java/aladin b/vo/java/aladin
new file mode 100755
index 00000000..7ff3359b
--- /dev/null
+++ b/vo/java/aladin
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Aladin Bourne shell launcher
+# P.Fernique [CDS] - F.Ochsenbein [CDS]
+# V1.1 - oct 2010
+# V1.0 - april 2009
+
+# JAVA memory max allocation (in Mb)
+mem=1024
+
+# Via a symbolic link ?
+prog=$0
+while test -h $prog; do
+ prog1=`ls -l $prog | awk '{print $NF}'`
+ if test `expr $prog1 : /` -gt 0; then # Absolute symlink
+ prog="$prog1"
+ else
+ prog=`dirname $prog`/$prog1 # Relative symlink
+ fi
+done
+
+# Aladin launch
+xterm -e java -Xmx${mem}m -jar `dirname $prog`/Aladin.jar -script="setconf Dir=`pwd`;" $*
+res=$?
+
+# Pb1: Aladin.jar not found
+if [ $res = 1 ]; then
+ echo "Aladin and Aladin.jar must be in the same directory"
+
+#Pb 2: JAVA not jound
+else
+ if [ $res = 127 ]; then
+ jvminstall="http://www.java/download"
+ browser="mozilla firefox netscape"
+ echo "Java Runtime environment not found"
+ echo "=> Fix your path or install it ($jvminstall)"
+ for w in $browser; do
+ $w -remote openURL\($jvminstall\) 2> /dev/null
+ if [ $? = 0 ]; then
+ exit 0
+ fi
+ done
+ for w in $browser; do
+ $w $jvminstall 2> /dev/null
+ if [ $? = 0 ]; then
+ exit 0
+ fi
+ done
+ fi
+fi
+
diff --git a/vo/java/app.aladin b/vo/java/app.aladin
new file mode 100755
index 00000000..3322fe23
--- /dev/null
+++ b/vo/java/app.aladin
@@ -0,0 +1,46 @@
+#!/bin/csh -f
+
+unalias ps egrep java
+
+set dir = `dirname $0`
+set me = `whoami`
+set pid = `ps -fwu $me | egrep -v grep | egrep -i Aladin.jar` # MACHDEP
+set npid = $#pid
+if ($npid == 0) then
+ # No Aladin running, check for a JSAMP/TOPCAT Hub.
+ set pid = `ps -fwu $me | egrep -i hub | egrep -i "jsamp|topcat"`
+ set npid = $#pid
+ set is_aladin = 0
+else
+ set is_aladin = 1
+endif
+
+set jar = Aladin.jar
+
+
+if ($#argv > 0) then
+ if ("$1" == "-bg") then
+ if ($npid == 0 && $is_aladin == 0) then
+ # No Hub running that we know about, clear out dreg .samp file.
+ /bin/rm -rf ~/.samp
+ endif
+ exec ${dir}/aladin &
+
+ else if ("$1" == "-kill") then
+ kill -9 $pid[2]
+ /bin/rm -rf ~/.samp
+
+ else if ("$1" == "-status") then
+ if ($npid == 0 && $is_aladin == 0) then
+ echo "off"
+ else
+ echo "on"
+ endif
+
+ endif
+else
+ if ($npid == 0 && $is_aladin == 0) then
+ /bin/rm -rf ~/.samp
+ endif
+ exec ${dir}/aladin
+endif
diff --git a/vo/java/app.hub b/vo/java/app.hub
new file mode 100755
index 00000000..6abc8562
--- /dev/null
+++ b/vo/java/app.hub
@@ -0,0 +1,52 @@
+#!/bin/csh -f
+
+unalias ps egrep java
+
+set dir = `dirname $0`
+set me = `whoami`
+set pid = `ps -fwu $me | egrep -i hub | egrep -i jsamp` # MACHDEP
+set npid = $#pid
+if ($npid == 0) then
+ # No JSAMP running, check for a Topcat/Aladin Hub.
+ set pid = `ps -fwu $me | egrep -i hub | egrep -i "topcat|aladin"`
+ set npid = $#pid
+ set is_jsamp = 0
+else
+ set is_jsamp = 1
+endif
+
+set jar = jsamp-1.3-2.jar
+
+set mode = "-mode client-gui"
+
+if ($#argv > 0) then
+ if ("$2" == "-no-gui") then
+ set mode = "-mode no-gui"
+ if (! ($?DISPLAY)) then
+ setenv DISPLAY :0
+ endif
+ endif
+
+ if ("$1" == "-bg") then
+ if ($npid == 0 && $is_jsamp == 0) then
+ /bin/rm -rf ~/.samp
+ endif
+ exec java -jar ${dir}/$jar hub ${mode} &
+
+ else if ("$1" == "-kill") then
+ kill -9 $pid[2]
+
+ else if ("$1" == "-status") then
+ if ($npid == 0 && $is_jsamp == 0) then
+ echo "off"
+ else
+ echo "on"
+ endif
+
+ endif
+else
+ if ($npid == 0 && $is_jsamp == 0) then
+ /bin/rm -rf ~/.samp
+ endif
+ exec java -jar ${dir}/$jar hub ${mode}
+endif
diff --git a/vo/java/app.topcat b/vo/java/app.topcat
new file mode 100755
index 00000000..e69f9134
--- /dev/null
+++ b/vo/java/app.topcat
@@ -0,0 +1,46 @@
+#!/bin/csh -fx
+
+unalias ps egrep java
+
+set dir = `dirname $0`
+set me = `whoami`
+set pid = `ps -fwu $me | egrep -i topcat | egrep -i Driver` # MACHDEP
+set npid = $#pid
+if ($npid == 0) then
+ # No TOPCAT running, check for a JSAMP/Aladin Hub.
+ set pid = `ps -fwu $me | egrep -i hub | egrep -i "jsamp|aladin"`
+ set npid = $#pid
+ set is_topcat = 0
+else
+ set is_topcat = 1
+endif
+
+set jar = topcat-full.jar
+
+
+if ($#argv > 0) then
+ if ("$1" == "-bg") then
+ if ($npid == 0 && $is_topcat == 0) then
+ # No Hub running that we know about, clear out dreg .samp file.
+ /bin/rm -rf ~/.samp
+ endif
+ exec ${dir}/topcat &
+
+ else if ("$1" == "-kill") then
+ kill -9 $pid[2]
+
+ else if ("$1" == "-status") then
+ if ($npid == 0 && $is_topcat == 0) then
+ echo "off"
+ else
+ echo "on"
+ endif
+
+ endif
+else
+ if ($npid == 0 && $is_topcat == 0) then
+ # No Hub running that we know about, clear out dreg .samp file.
+ /bin/rm -rf ~/.samp
+ endif
+ exec ${dir}/topcat
+endif
diff --git a/vo/java/hub b/vo/java/hub
new file mode 100755
index 00000000..11c70b5b
--- /dev/null
+++ b/vo/java/hub
@@ -0,0 +1,44 @@
+#!/bin/csh -f
+
+unalias ps egrep java
+
+set dir = `dirname $0`
+set me = `whoami`
+set pid = `ps -fwu $me | egrep -i hub | egrep -i jsamp` # MACHDEP
+set npid = $#pid
+set jar = jsamp-1.3-2.jar
+
+set mode = "-mode client-gui"
+
+if ($#argv > 0) then
+ if ("$2" == "-no-gui") then
+ set mode = "-mode no-gui"
+ if (! ($?DISPLAY)) then
+ setenv DISPLAY :0
+ endif
+ endif
+
+ if ("$1" == "-bg") then
+ if ($npid == 0) then
+ /bin/rm -rf ~/.samp
+ exec java -jar ${dir}/$jar hub ${mode} &
+ endif
+
+ else if ("$1" == "-kill") then
+ kill -9 $pid[2]
+ /bin/rm -rf ~/.samp
+
+ else if ("$1" == "-status") then
+ if ($npid == 0) then
+ echo "off"
+ else
+ echo "on"
+ endif
+
+ endif
+else
+ if ($npid == 0) then
+ /bin/rm -rf ~/.samp
+ exec java -jar ${dir}/$jar hub ${mode}
+ endif
+endif
diff --git a/vo/java/jsamp-1.3-2.jar b/vo/java/jsamp-1.3-2.jar
new file mode 100644
index 00000000..e381f2ef
--- /dev/null
+++ b/vo/java/jsamp-1.3-2.jar
Binary files differ
diff --git a/vo/java/topcat b/vo/java/topcat
new file mode 100755
index 00000000..0c5909a9
--- /dev/null
+++ b/vo/java/topcat
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+#+
+# Name:
+# topcat
+
+# Purpose:
+# Invokes the TOPCAT application on unix
+
+# Description:
+# This shell script invokes the TOPCAT application.
+# It's not very complicated, but performs some argument manipulation
+# prior to invoking java with the right classpath and classname.
+#
+# 1. if a class path is specified using either the CLASSPATH
+# environment variable or the -classpath flag to this script,
+# it will be added to the application classpath
+#
+# 2. any command-line arguments which look like they are destined
+# for java itself (starting with -D or -X, or prefixed with -J) will
+# be sent to java, and the others will be sent to the application
+
+# Requisites:
+# - java should be on the path.
+#
+# - relative to the directory in which this script is installed,
+# one of the following jar files should exist and contain the
+# TOPCAT classes:
+# ./topcat-full.jar
+# ./topcat-lite.jar
+# ../../lib/topcat/topcat.jar
+
+# Authors:
+# MBT: Mark Taylor (Starlink)
+#-
+
+# Set locations of acceptable jar files (relative to this script).
+topcat_jars="\
+ ../lib/topcat/topcat.jar\
+ topcat-full.jar\
+ topcat-lite.jar\
+"
+
+# Find where this script is located.
+bindir="`dirname $0`"
+
+# Mac-specific items.
+javaArgs0=""
+if test -x /usr/bin/sw_vers && /usr/bin/sw_vers | grep -q 'OS.X'; then
+
+ # Look for the jar in the resource bundle, since we may have been
+ # installed that way.
+ topcat_jars="$topcat_jars ../Contents/Resources/Java/topcat-full.jar ../TOPCAT.app/Contents/Resources/Java/topcat-full.jar"
+
+ # Look for an icon file and prepare to start java in such a way that
+ # it gets used for the dock icon (rather than the generic java one).
+ icns_files="../TOPCAT.app/Contents/Resources/Topcat.icns ../lib/topcat/MacOS/Topcat.icns"
+ icns_file=""
+ for f in $icns_files; do
+ if test -r "$bindir/$f"; then
+ icns_file="$bindir/$f"
+ fi
+ done
+ if test -r "$icns_file" && java -X | grep -q -- -Xdock:icon; then
+ javaArgs0="$javaArgs0 "\'-Xdock:icon=$icns_file\'
+ fi
+
+ # Set Mac application name.
+ javaArgs0="$javaArgs0 -Dcom.apple.mrj.application.apple.menu.about.name=TOPCAT"
+fi
+
+# Locate the application jar file.
+for j in $topcat_jars; do
+ if test -z "$appjar" -a -f "$bindir/$j"; then
+ appjar="$bindir/$j"
+ fi
+done
+if test ! -f "$appjar"
+then
+ echo 1>&2 "Can't find topcat classes in ${bindir} - looked for:$topcat_jars"
+ exit 1
+fi
+
+# Divide the arguments into two parts: those destined as flags for
+# the java binary, and the rest.
+javaArgs=""
+appArgs=""
+while test "$1"
+do
+ if echo $1 | grep -- '^-[XD]' >/dev/null; then
+ javaArgs="$javaArgs "\'$1\'
+ elif echo $1 | grep -- '^-J' >/dev/null; then
+ javaArgs="$javaArgs "\'`echo $1 | sed s/^-J//`\'
+ elif [ "$1" = "-classpath" -a -n "$2" ]; then
+ shift
+ export CLASSPATH="$1"
+ else
+ appArgs="$appArgs "\'$1\'
+ fi
+ shift
+done
+
+# Check for Cygwin and transform paths.
+case "`uname`" in
+ CYGWIN*)
+ if test -n "$CLASSPATH"; then
+ CLASSPATH=`cygpath --path --windows "${appjar}:$CLASSPATH"`
+ else
+ CLASSPATH=`cygpath --windows "${appjar}"`
+ fi
+ ;;
+ *)
+ CLASSPATH="${appjar}:${CLASSPATH}"
+ ;;
+esac
+
+# Run topcat.
+cmd="java \
+ $javaArgs0 \
+ $javaArgs \
+ -Duk.ac.starlink.topcat.cmdname=topcat \
+ -classpath \${CLASSPATH} uk.ac.starlink.topcat.Driver \
+ $appArgs"
+eval "$cmd"
diff --git a/vo/java/topcat-full.jar b/vo/java/topcat-full.jar
new file mode 100644
index 00000000..f8897d73
--- /dev/null
+++ b/vo/java/topcat-full.jar
Binary files differ
diff --git a/vo/java/voclient.jar b/vo/java/voclient.jar
new file mode 100644
index 00000000..6ab4f351
--- /dev/null
+++ b/vo/java/voclient.jar
Binary files differ
diff --git a/vo/java/voclientd b/vo/java/voclientd
new file mode 100755
index 00000000..1e250338
--- /dev/null
+++ b/vo/java/voclientd
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+#+
+# Name:
+# voclientd
+#
+# Purpose:
+#
+# Description:
+# This shell script invokes the VOClient daemon.
+# It's not very complicated, but performs some argument manipulation
+# prior to invoking java with the right classpath and classname.
+#
+# 1. If a class path is specified using either the CLASSPATH
+# environment variable or the -classpath flag to this script,
+# it will be added to the application classpath.
+#
+# 2. Any initial command-line arguments which look like they are destined
+# for java itself (starting with -D or -X) will be sent to java,
+# and the others will be sent to the application.
+
+# Requisites:
+# - java should be on the path.
+#
+# - the application jar file should exist in the same directory as this
+# command.
+#
+# Credits:
+# Based on the STILTS startup script by Mark Taylor (Starlink)
+# Original version - Michael Fitzpatrick, NOAO, June 2006
+# VOClient integration - DCT 2006-July-10
+# Modified for NVOSS bin,java/lib install - DCT August 2006
+# Modified for VO-CLI distro - Michael Fitzpatrick, NOAO, January 2008
+# Generalized for VO-CLI distro - Michael Fitzpatrick, NOAO, January 2009
+#-
+
+
+# The following jar files come from the NVOSS Software distribution but are
+# included with the VO-CLI distribution as well. They are needed to support
+# the voclientd interface and are assumed to be in a directory called
+# 'voclient.jars' in the same directory as the 'voclientd' command (this
+# script).
+
+
+
+# Determine the BIN and LIB directories.
+if test -n "$VOCLI_HOME" -a -f "$VOCLI_HOME/voclientd"; then
+ appjar="$VOCLI_HOME/voclient.jar"
+
+else
+
+ # Find where this script is located.
+ bindir="`dirname $0`"
+ appjar="$bindir/voclient.jar"
+
+
+ # Make sure it looks reasonable.
+ if test ! -f "${appjar}"
+ then
+ echo 1>&2 "Can't find VOClient daemon classes in ${jardir}"
+ exit 1
+ fi
+
+
+ # Locate the application jar file.
+ for j in $voc_jars; do
+ if test -z "$appjar" -a -f "$bindir/$j"; then
+ appjar="$bindir/$j"
+ jardir="$bindir/voclient.jars/"
+ fi
+ done
+
+
+ # Add the VOClient jar to the beginning of the CLASSPATH.
+ if test -f "${appjar}"; then
+ CLASSPATH="${appjar}:${CLASSPATH}"
+ fi
+fi
+
+
+# Pull out any arguments which look to be destined for the java binary.
+javaArgs="-Xmx1024m"
+while test "$1"
+do
+ if echo $1 | grep -- '^-[XD]' >/dev/null; then
+ javaArgs="$javaArgs $1"
+ shift
+ elif [ "$1" = "-classpath" -a -n "$2" ]; then
+ shift
+ export CLASSPATH="$1"
+ shift
+ else
+ break
+ fi
+done
+
+# Check for Cygwin and transform paths.
+case "`uname`" in
+ CYGWIN*)
+ if test -n "$CLASSPATH"; then
+ CLASSPATH=`cygpath --path --windows "${appjar}:$CLASSPATH"`
+ else
+ CLASSPATH=`cygpath --windows "${appjar}"`
+ fi
+ ;;
+ *)
+ CLASSPATH="${appjar}:${CLASSPATH}"
+ ;;
+esac
+
+# Execute the command.
+java \
+ $javaArgs \
+ -classpath $CLASSPATH \
+ voclient.VOClientd \
+ "$@"
+