Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1223564

CLASSPATH is prepended to system classes! Bad if it points to another JDK.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.0
    • hotspot
    • sparc
    • solaris_2.5

    Description

      The current setting of the CLASSPATH environment variables should have
      no effect on running javac. i.e. the javac script should override CLASSPATH
      so that it contains the directories with the classes necessary to successfully
      run javac.
      =============
      fy - 12Oct94: Passing this to Timmy, who might want to give it to someone else.
      This isn't a compiler bug, it's a "release" bug.

      =============
      mem - 07 Nov 95: Tim: I originally submitted this bug, and I've run into the implications of this again on several occassions. The wording of this synopsis is
      a little weird so I'd like to be more specific.

      Suppose that my classpath includes my personal workspace (or some other directory
      that contains the java development environment classes):
      .:/home/mem/ws/java/build/classes

      Now, let's say that I run javac from the command line and the javac that I get is from,
      say, /usr/local/java/latest/bin. That is, the javac that I get...is NOT the javac in my
      workspace.

      If my workspace is NOT built, then everything is fine. However, if I do have my
      workspace built, then the classes in my workspace pre-empt the classes that "belong"
      with the compiler that I'm running and the compiler seg faults.

      THIS IS UNACCEPTABLE. The compiler should ensure that it can run...by doing the
      right thing with the classpath. Right now the compiler script *appends* the directory
      where the currently running javac lives to the *end* of the classpath. It should
      *prepend*.

      I believe that this problem affects the other scripts as well.

      Attachments

        Issue Links

          Activity

            People

              apalanissunw Anand Palaniswamy (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: