setcwd.sh revision 2365:4c234c13f66a
1233294Sstas#! /bin/sh
2178825Sdfr
3178825Sdfr#
4178825Sdfr# Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
5178825Sdfr# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6178825Sdfr#
7178825Sdfr# This code is free software; you can redistribute it and/or modify it
8178825Sdfr# under the terms of the GNU General Public License version 2 only, as
9178825Sdfr# published by the Free Software Foundation.
10178825Sdfr#
11178825Sdfr# This code is distributed in the hope that it will be useful, but WITHOUT
12178825Sdfr# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13178825Sdfr# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14178825Sdfr# version 2 for more details (a copy is included in the LICENSE file that
15178825Sdfr# accompanied this code).
16178825Sdfr#
17178825Sdfr# You should have received a copy of the GNU General Public License version
18178825Sdfr# 2 along with this work; if not, write to the Free Software Foundation,
19178825Sdfr# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20178825Sdfr#
21178825Sdfr# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22178825Sdfr# or visit www.oracle.com if you need additional information or have any
23178825Sdfr# questions.
24178825Sdfr#
25178825Sdfr
26178825Sdfr#
27178825Sdfr
28178825Sdfrif [ x"$TESTJAVA" = x ]; then 
29178825Sdfr        TESTJAVA=$1 
30178825Sdfr        shift 
31178825Sdfrfi
32178825Sdfrif [ x"$TESTCLASSES" = x ]; then TESTCLASSES=.; fi
33178825Sdfr
34178825Sdfr# copy the class to our working directory
35178825Sdfrmkdir foo
36178825Sdfrcp ${TESTCLASSES}/SetCwd.class .
37178825Sdfrcp ${TESTCLASSES}/SetCwd.class foo
38178825Sdfr
39178825Sdfr# now start the test
40178825Sdfr${TESTJAVA}/bin/java SetCwd
41178825Sdfr
42178825Sdfr