Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Mar 1998 16:31:09 -0800
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        java@FreeBSD.ORG
Cc:        current@FreeBSD.ORG
Subject:   JWS 2.0 works in FreeBSD 8)
Message-ID:  <199803290031.QAA27476@rah.star-gate.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
JWS, Sun's Java Workshop Shop -- IDE for Java.



NOTE: The debugger does not work due to JWS using a Java Native Interface 
      that means that the distributed JWS uses a binary library for the
      VM machines to talk to the debugger -- this is from the linux jws
      patch.       

You will need
 1. 	the gnu gettext  so just go to your favorite gnu ftp 
	site and download it . I forgot where I got mine from.

 2. 	bash

 3.	jdk1.1.5

 4.	the linux patch found at:
	ftp://ftp.suse.com/pub/SuSE-Linux/suse_update/JWS2.0/

 5.	JWS2.0 --- get it from http://shop.sun.com/ . There is a 30 day
	evaluation one which you can download and thats what I have over
	here. Sun is supposed to released in mid April an upgrade JWS2.0 
	to support JFC 1.1.

I modified startup_wrapper and locate_dirs to work in our environment.

After untarring the linux patch,

copy  my startup_wrapper to JWS/intel-S2/bin
copy my locate_dirs to JWS/solaris/bin

startup_wrapper assumes that JAVA_HOME points to your jdk1.1.5 installation,
if not either define JAVA_HOME or edit startup_wrapper.

To run JWS, intel-S2/bin/jws


	That, that, thats folks!
	Amancio





[-- Attachment #2 --]
#!/usr/local/bin/bash
#
# @(#)locate_dirs	1.14 97/07/22  
#
# Copyright (c) 07/22/97 Sun Microsystems, Inc. All Rights Reserved.
#
# NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!!
#
#    The quoting in this script is very important.  Any variable that
#    can contain a path should be quoted when used.  This is because is it
#    possible to get a space embedded in a path.
#
# NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!!

# Specific utilities used (avoid path search for performance)
#
# cd, echo, pwd  are sh built-ins
GETTEXT=/usr/local/bin/gettext

# For gettext to find its localized messages.
#
TEXTDOMAINDIR="${_SS_JWS_HOME}"/lib/locale
TEXTDOMAIN=SUNW_SPRO_JWS
export TEXTDOMAIN
export TEXTDOMAINDIR

# Given the root of a JDK tree, set _SS_JDK_HOME to the parent directory
#	of bin,classes and lib
#
# There are two types of JDK directories:
#	* build directories are identical to the JDK directory provided
#		by JavaSoft. 
#	* archive directories simply copy all content from the build
#		directory that is to be shipped to the user.
#
if [ ! -r "${_SS_JWS_HOME}/lib/visualrt.zip" ] ; then
    echo "`${GETTEXT} 'Error: Invalid _SS_JWS_HOME: '`${_SS_JWS_HOME}" 1>&2 
    exit 1
fi

# If no JDK specified, assume its installed next to JWS.
#
if [ ! "${_SS_JDK}" ]
then
  if [ -d "${_SS_JWS_HOME}/../JDK" ]
  then
    _SS_JDK="`cd \"${_SS_JWS_HOME}\"/../JDK; pwd`"
  else
    echo `${GETTEXT} 'Error: Cannot find JDK, set _SS_JDK to path of JDK'` 1>&2
    exit 1
  fi
fi

# If there's no bin or lib directory, its invalid for our use.
# It may be a workspace thats not completely built.
#
if [ -d "${_SS_JDK}/bin" ]
then
  if [ ! -d "${_SS_JDK}/lib" ]
  then
    echo "`${GETTEXT} 'Error: Invalid JDK, lib directory missing.'`" 1>&2
    exit 1
  fi
  if [ ! -r "${_SS_JDK}/lib/classes.zip" -a ! -d "${_SS_JDK}/classes" ]
  then
    echo "`${GETTEXT} 'Error: Invalid JDK, lib/classes.zip and lib/classes missing'`" 1>&2
    exit 1
  fi
  _SS_JDK_HOME="${_SS_JDK}"
else
  echo "`${GETTEXT} 'Error: Invalid JDK, bin directory missing.'`" 1>&2
  exit  1
fi

# Export location for use by JWS builder in bin/javac
#
export _SS_JDK_HOME

[-- Attachment #3 --]
#!/usr/local/bin/bash -h -x
#
# @(#)startup_wrapper	1.131 97/08/23  
#
#
# Anpassung fuer Linux durch Martin Helmling mh@octogon.de
#
# Es wird nicht JDK von Solaris genommen sondern das Linux Java
# ggf. folgenden Pfad modifizieren:
_SS_JDK=$JAVA_HOME

#
# Copyright (c) 08/23/97 Sun Microsystems, Inc. All Rights Reserved.
#
# NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!!
#
#    The quoting in this script is very important.  Any variable that
#    can contain a path should be quoted when used.  This is because is it
#    possible to get a space embedded in a path.
#
# NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!! NOTE!!

#########################
# Specific utilities used (avoid path search for performance)
#
# cd, echo, pwd  are sh built-ins
GETTEXT=/usr/local/bin/gettext
MKDIR=/bin/mkdir
MV=/bin/mv
PRINTF=/usr/bin/printf
SED=/usr/bin/sed
UNAME=/usr/bin/uname
JAVA_OS_NAME=Solaris
export JAVA_OS_NAME

#########################
#  Function Definitions
#
notExistOrEmpty() {
    if [ ! -r "${1}" ]; then return 1; fi
    if [ ! -d "${1}" ]; then return 0; fi
    FILELIST="`echo \"${1}\"/* \"${1}\"/.[!.]*`"
    if [ "${FILELIST}" = "${1}/* ${1}/.[!.]*" ]; then
	return 1
    fi
    return 0
}
appendCLASSPATH() {
    SEP="${1:+:}"
    CLASSPATH="${CLASSPATH}${CLASSPATH:+${SEP}}${1}"
}
appendRUNCLASSPATH() {
    SEP="${1:+:}"
    RUNCLASSPATH="${RUNCLASSPATH}${RUNCLASSPATH:+${SEP}}${1}"
}
appendJWSPATH() {
    SEP="${1:+:}"
    JWSPATH="${JWSPATH}${JWSPATH:+${SEP}}${1}"
}
prependRUNCLASSPATH() {
    SEP="${1:+:}"
    RUNCLASSPATH="${1}${RUNCLASSPATH:+${SEP}}${RUNCLASSPATH}"
}

# Define functions to screen empty or non-existent paths.
# Removing these from the classpaths yield a performance boost at run time.
checkAppendPATH() {
    notExistOrEmpty "${1}"
    if [ "$?" = "0" ]; then
	SEP="${1:+:}"
        savedir="${1}"
        shift
        for i in $*; do
            envvar=${i};
            shift
            if [ "${envvar}" = "CLASSPATH" ]; then
                appendCLASSPATH "${savedir}"
            elif [ "${envvar}" = "RUNCLASSPATH" ]; then
                appendRUNCLASSPATH "${savedir}"
            elif [ "${envvar}" = "JWSPATH" ]; then
                appendJWSPATH "${savedir}"
            fi
        done
    fi
}

#########################
# Determine JWS_HOME
#
BASEDIR=${BASEDIR:=`/usr/bin/dirname $0`}
_SS_JWS_HOME="${_SS_JWS_HOME:-`cd ${BASEDIR}/../..; pwd`}"
if [ ! -d "${_SS_JWS_HOME}" ] ; then
    echo "`${GETTEXT} 'Error: Invalid _SS_JWS_HOME: '`${_SS_JWS_HOME}" 1>&2
    exit 1
fi

# For gettext to find its localized messages.
#
TEXTDOMAINDIR="${_SS_JWS_HOME}"/lib/locale
TEXTDOMAIN=SUNW_SPRO_JWS
export TEXTDOMAIN
export TEXTDOMAINDIR

# Get platform specifics.
#
PLATFORM="`${UNAME} -srm`"
read V_SYS V_REL V_ARCH <<-EOF
${PLATFORM}
EOF
#if [ "${V_REL}" -lt "2.0" ] ; then
#    echo "`${GETTEXT} 'Error: JWS requires at least Linux 2.0 .'`" 1>&2
#    exit 1
#fi
# Use variant after V_SYS/V_REL/V_ARCH are set up.
#VARIANT=`. "${_SS_JWS_HOME}"/solaris/bin/variant`
V_ARCH=i386
VARIANT=intel-S2
PLATFORM=SunOS
 
# check for motif library
#
#MOTIFHOME=${MOTIFHOME:-/usr/dt}
#if [ ! -r ${MOTIFHOME}/lib/libXm.so.3 ] ; then
#    ${PRINTF} "`${GETTEXT} 'Error: Motif library %s not found.'`\n" "${MOTIFHOME}/lib/libXm.so.3" 1>&2
#    exit 1
#fi

# Make sure THREADS_FLAG is obeyed.
#
if [ -z "${THREADS_FLAG}" ] ; then
    THREADS_FLAG=green
elif [ "${THREADS_FLAG}" != "green" -a "${THREADS_FLAG}" != "native" ]; then
    echo "`${GETTEXT} 'Error: THREADS_FLAG has an unrecognized value:'` ${THREADS_FLAG}" 1>&2
    exit 1
fi
export THREADS_FLAG

# Currently, only sunwjit is supported.
if [ "${JAVA_COMPILER}" != "NONE" -a "${JAVA_COMPILER}" != "sunwjit" ]; then
    unset JAVA_COMPILER
fi

# Determine _SS_JDK_HOME & JAVA_HOME settings.
#
. "${_SS_JWS_HOME}"/solaris/bin/locate_dirs

JAVA_HOME="${_SS_JDK_HOME}"
echo $JAVA_HOME
export JAVA_HOME

# Set Paths
#
# We intentionally don't inherit the user's CLASSPATH because it may
# contains things from other product installations.  So clear it to start.
CLASSPATH=""
JWSPATH=""
checkAppendPATH "${_SS_JWS_HOME}/lib/jws_patch.zip" RUNCLASSPATH JWSPATH
checkAppendPATH "${_SS_JWS_HOME}/lib/jws.zip" RUNCLASSPATH JWSPATH
checkAppendPATH "${_SS_JDK_HOME}/classes" RUNCLASSPATH CLASSPATH
checkAppendPATH "${_SS_JDK_HOME}/lib/classes_patch.zip" RUNCLASSPATH CLASSPATH
checkAppendPATH "${_SS_JDK_HOME}/lib/classes.zip" RUNCLASSPATH CLASSPATH
# These are needed by GUI builder and cannot be removed.
# Its at the end of the pathlist for performance.
appendRUNCLASSPATH "${_SS_JWS_HOME}/classes"
appendRUNCLASSPATH "${HOME}/.jws2.0/ImportedComponents/classes"
# Add the PlugIn dirs to the classpath even if they are empty because
# the I18N code for reading the toolbar prop files is based on the classpath.
# The PlugIn classes dirs may be empty but there can still be toolbar prop
# files which need to be found along the classpath.
# Put these classes at the end for performance reasons.
appendRUNCLASSPATH "${HOME}/.jws2.0/PlugIns/classes"
appendRUNCLASSPATH "${_SS_JWS_HOME}/PlugIns/classes"
appendJWSPATH "${_SS_JWS_HOME}/classes"

export CLASSPATH
export JWSPATH

JWS_BIN="${_SS_JWS_HOME}"/${VARIANT}/bin
PATH="${PATH}:${JWS_BIN}"
export PATH

LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${_SS_JDK_HOME}/lib/${V_ARCH}/${THREADS_FLAG}_threads:/${MOTIFHOME}/lib:${JWS_BIN}"
export LD_LIBRARY_PATH



# Create .jws directories
#
JDEDIR="${HOME}"/.jde
JWSDIR="${HOME}"/.jws
JWSVERSDIR="${HOME}"/.jws2.0

# backwards compatibility
if [ -d "${JDEDIR}" ] ; then
    if [ ! -d "${JWSDIR}" ] ; then
        ${PRINTF} "`${GETTEXT} 'Note: Moving %s to %s'`\n" "${JDEDIR}" "${JWSDIR}" 1>&2
        ${MV} "${JDEDIR}" "${JWSDIR}"
    fi
fi

# Parse the arguments
#
initial_heap="-ms5m"
c_stack_size="-ss384k"
java_opts="${JAVA_ARGS}"
# XXX resii - workaround the JDK 1.1 GC problem, ensure classes not unloaded.
java_opts="-noclassgc -noasyncgc ${java_opts}"
# XXX end
jws_opts=""
main_class=sun.jws.Main
rdebug=false
while [ $# -ne 0 ]; do
   case "${1}" in 
    -classpath) 
	if [ $# -gt 1 ]; then
	    shift; userclasspath="${userclasspath}${userclasspath:+:}${1}"
	else
	    echo "`${GETTEXT} 'Error: -classpath requires an argument'`" 1>&2
	    exit 1
	fi ;;
    -debug)  main_class=sun.jws.Debugger.Agent;
	     debug_prop="-Ddebug.browser=true";
	     java_opts="${java_opts} -debug -noagent" ;;
    -rdebug) rdebug=true; main_class=sun.jws.Debugger.Agent;
	     java_opts="${java_opts} -debug -noagent" ;;
    -remotedebug) main_class=sun.jws.Debugger.Agent;
	     java_opts="${java_opts} -debug -noagent" ;;
    -display)
	if [ $# -gt 1 ]; then
	    shift; DISPLAY="${1}"; export DISPLAY
	else
	    echo "`${GETTEXT} 'Error: -display requires an argument'`" 1>&2
	    exit 1
	fi ;;
    -prof)   java_opts="${java_opts} -prof -debug -noagent" ;;
    -test)   main_class=sun.jws.TestClient ;;
    -noconsole) java_opts="${java_opts} -Djws.console.show=false" ;;
    -nojit)  java_opts="${java_opts} -Djava.compiler=NONE" ;;
    -mainclass) 
	if [ $# -gt 1 ]; then
	    main_class="${2}"; shift
	else
	    echo "`${GETTEXT} 'Error: -mainclass requires an argument'`" 1>&2
	    exit 1
	fi ;;
    -ms*)    initial_heap="${1}" ;;
    -ss*)    c_stack_size="${1}" ;;
    -D*)     java_opts="${java_opts} ${1}" ;;
    -J-*)    java_opts="${java_opts} `echo ${1} | ${SED} s/-J//`" ;;
    *)       if [ ${rdebug} = "true" ] ; then
		echo "`${GETTEXT} 'Warning: argument ignored:'`" ${1} 1>&2
	     else
		SPACE="${1:+ }"
	        app_args="${app_args}${app_args:+${SPACE}}\"${1}\""
	     fi ;;
   esac
   shift;
done
java_opts="${initial_heap} ${c_stack_size} ${java_opts}"
# User's classpath is always at the front.
prependRUNCLASSPATH "${userclasspath}"

# Check for java interpreter.
#
JAVA_VM=${JAVA_VM:-"java"}
javaloc="${_SS_JDK_HOME}/bin/${V_ARCH}/${THREADS_FLAG}_threads"
if [ -x "${javaloc}/${JAVA_VM}" ] ; then
    JAVA="${javaloc}/${JAVA_VM}"
else
    echo "`${GETTEXT} 'Error: Cannot find Java VM:'` ${javaloc}/${JAVA_VM}" 1>&2
    exit 1
fi

# Add WWW_HOME option
#
if [ ! -z "${WWW_HOME}" ] ; then
    java_opts="${java_opts} -Dwww.home=\"${WWW_HOME}\""
fi

# Add jws.xdisplay option for rendez-vous code in Main.java.
# Report error if DISPLAY is not set.
#
if [ ! -z "${DISPLAY}" ] ; then
    java_opts="${java_opts} -Djws.xdisplay=${DISPLAY}"
else if [ "${JWS_DISPLAY_REQUIRED:-true}" = "true" ] ; then
    echo "`${GETTEXT} 'Error: X display not specified.'`" 1>&2
    echo "`${GETTEXT} '       Use the -display option or set the DISPLAY environment variable.'`" 1>&2
    exit 1
    fi
fi

# Set colors when not running under CDE
# depends on $DISPLAY
if [ -x /usr/openwin/bin/xprop -a -x /usr/openwin/bin/xrdb ]; then
    # Test if running under CDE
    /usr/openwin/bin/xprop -root 2>/dev/null | egrep -s "^_DT_SM_WINDOW_INFO"
    if [ "$?" = "1" ]; then
	# Not CDE. Convert OpenWindows desktop colors to Motif if
	# defined, or use fallback values
	/usr/openwin/bin/xrdb -query 2>/dev/null | awk '\
	BEGIN				{ controlbg="#CCCCCC"; \
					  controlfg="#000000"; \
					  textbg="#FFFFFF"; \
					  textfg="#000000"; \
					} \
	/OpenWindows.WindowColor:/	{ controlbg=$2 } \
	/OpenWindows.WindowForeground:/	{ controlfg=$2 } \
	/OpenWindows.DataBackground:/	{ textbg=$2 } \
	/OpenWindows.DataForeground:/	{ textfg=$2 } \
	END				{ print "*.background: " controlbg; \
					  print "*.foreground: " controlfg; \
					  print "*awtTextColor.background:    " textbg; \
					  print "*awtTextColor.foreground:    " textfg; \
					}' > /tmp/AWTColors.$LOGNAME
	XFILESEARCHPATH="${XFILESEARCHPATH}:/tmp/AWTColors.$LOGNAME"
	export XFILESEARCHPATH
    fi
fi

# Start the java interpreter.
#
eval exec "${JAVA}" \
        -classpath \"${RUNCLASSPATH}\" \
        -Djws.build.classes=\"${CLASSPATH}\" \
        -Djws.classes=\"${JWSPATH}\" \
        -Djws.home=\"${_SS_JWS_HOME}\" \
        -Dhotjava.home=\"${_SS_JWS_HOME}\" \
        -Djws.bin=\"${JWS_BIN}\" \
        -Djdk.bin=\"${_SS_JDK_HOME}/bin\" \
        -Djws.ut.user=${USER} \
	-Djws.variant=\"${VARIANT}\" \
        "-Djws.ut.platform=\"${PLATFORM}\"" \
        ${debug_prop} ${java_opts} ${main_class} ${app_args}

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803290031.QAA27476>