home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / j2sdk / files / linux / j2sdklin.bin / jdk1.3.1 / bin / realpath < prev    next >
Encoding:
Text File  |  2001-05-06  |  1.3 KB  |  47 lines

  1. #!/bin/sh
  2. #
  3. # @(#)realpath.sh    1.3 01/02/09
  4. #
  5. # Copyright 1994-2001 by Sun Microsystems, Inc.,
  6. # 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  7. # All rights reserved.
  8. #
  9. # This software is the confidential and proprietary information
  10. # of Sun Microsystems, Inc. ("Confidential Information").  You
  11. # shall not disclose such Confidential Information and shall use
  12. # it only in accordance with the terms of the license agreement
  13. # you entered into with Sun.
  14. #
  15.  
  16. SVPATH="$PATH"
  17. PATH=/bin:/usr/bin
  18. case "`uname -m`" in
  19.     i[3-6]86)
  20.         proc=i386
  21.         ;;
  22.     sparc*)
  23.         proc=sparc
  24.         ;;
  25.     *)
  26.         proc="`uname -m`"
  27.         ;;
  28. esac
  29.  
  30. PATH="$SVPATH"
  31. exec `dirname $0`/$proc/`basename $0` $@
  32.  
  33. #
  34. # Comment on purpose:
  35. #
  36. # The dynamic library code in glibc does not seem to canonicalize
  37. # path names to when checking if a library has already been loaded.
  38. # As a result, if LD_LIBRARY_PATH is set with non-canonical paths
  39. # then the loading of libfontmanager.so-linked-against-libawt.so
  40. # causes a duplicate loading of libawt.so (the
  41. # System.loadLibrary("awt") call uses the canonical path name).
  42. #
  43. # This program is a simple workaround to the problem so that
  44. # .java_wrapper can set LD_LIBRARY_PATH to match the canonicalization
  45. # made by System.loadLibrary().
  46. #
  47.