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

javac no longer follows symlinks

    Details

    • Subcomponent:
    • Resolved In Build:
      03
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.6, solaris_8
    • Verification:
      Verified

      Backports

        Description

        (test case, in pre-built form, incl. directory structure, is attached as a compressed tar file)

        Name: krT82822 Date: 08/26/99


        We use symlinks to select between different O(R)BS's generated
        Java from IDL. (Don't ask!) The new javac doesn't follow
        symlinks to directories, so this doesn't work. Here's an
        example:

        1:
        78 % ls -lR
        .:
        total 18
        -rw-r--r-- 1 jws staff 71 Aug 26 17:19 P.java
        drwxr-xr-x 2 jws staff 8192 Aug 26 17:20 other-sub
        lrwxrwxrwx 1 jws staff 9 Aug 26 17:18 sub -> other-sub

        ./other-sub:
        total 2
        -rw-r--r-- 1 jws staff 57 Aug 26 17:19 Q.java
        79 % cat P.java
        package test;

        import test.sub.Q;


        public class P {
            public Q q;
        }
        80 % cat sub/Q.java
        package test.sub;


        public class Q {
            public int i;
        }
        81 % which javac
        /share/packages/Java/jdk1.2/bin/javac
        82 % /share/packages/Java/jdk1.2/bin/javac P.java
        83 % !l
        ls -lR
        .:
        total 20
        -rw-r--r-- 1 jws staff 208 Aug 26 17:21 P.class
        -rw-r--r-- 1 jws staff 71 Aug 26 17:19 P.java
        drwxr-xr-x 2 jws staff 8192 Aug 26 17:21 other-sub
        lrwxrwxrwx 1 jws staff 9 Aug 26 17:18 sub -> other-sub

        ./other-sub:
        total 4
        -rw-r--r-- 1 jws staff 201 Aug 26 17:21 Q.class
        -rw-r--r-- 1 jws staff 57 Aug 26 17:19 Q.java
        84 % !rm
        rm *.class sub/*.class
        rm: remove P.class (yes/no)? y
        rm: remove sub/Q.class (yes/no)? y
        85 % !ls
        ls -lR
        .:
        total 18
        -rw-r--r-- 1 jws staff 71 Aug 26 17:19 P.java
        drwxr-xr-x 2 jws staff 8192 Aug 26 17:22 other-sub
        lrwxrwxrwx 1 jws staff 9 Aug 26 17:18 sub -> other-sub

        ./other-sub:
        total 2
        -rw-r--r-- 1 jws staff 57 Aug 26 17:19 Q.java
        86 % ~java/jdk1.3/bin/javac -verbose P.java
        [parsing started P.java]
        [parsing completed 604ms]
        P.java:3: cannot resolve symbol
        symbol : class Q
        location: package sub
        import test.sub.Q;
                        ^
        [loading /a/share/mounts/b/java/jdk1.3/jre/lib/rt.jar(java/lang/Object.class)]
        P.java:7: cannot resolve symbol
        symbol : class Q
        location: class test.P
            public Q q;
                   ^
        [checking test.P]
        [total 2506ms]
        2 errors
        87 % !ls
        ls -lR
        .:
        total 18
        -rw-r--r-- 1 jws staff 71 Aug 26 17:19 P.java
        drwxr-xr-x 2 jws staff 8192 Aug 26 17:22 other-sub
        lrwxrwxrwx 1 jws staff 9 Aug 26 17:18 sub -> other-sub

        ./other-sub:
        total 2
        -rw-r--r-- 1 jws staff 57 Aug 26 17:19 Q.java
        88 % echo $CLASSPATH
        /usr/users/jws/src/java:
        89 % /bin/pwd
        /a/hosts2/all/home/staff/jws/src/java/test

        2:
        See 1.
        3:
        See 1.
        4:
        See 1.
        5:
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
        Java(TM) HotSpot Client VM (build 1.3beta-O-release, 1.3beta-O-release, interpreted mode)
        java full version "1.3beta-O"
        (Review ID: 94420)
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gafter Neal Gafter
                  Reporter:
                  kryansunw Kevin Ryan (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: