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

Package clashes with class of same name.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P1 P1
    • None
    • 1.1, 1.1.2, 1.2.0, 1.3.0
    • tools
    • generic, sparc
    • solaris_2.4, solaris_2.5, solaris_2.5.1

      This bug has been introduced in Kestrel.
      Compliller fails trying to import a class if there is a package
      with the same name.

      Here is example to demonstrate this bug:

      Class A/B.java:

      package A;
      public class B {
      }
      ___
      A/B/C.java:

      package A.B;
      import A.*;
      public class C{
      }
      ___
      Output:
      %echo $CLASSPATH
      /home/dsilaev/java_tests

      %/usr/local/java/jdk1.3/solaris/bin/javac C.java
      C.java:1: package A.B clashes with class of same name
      package A.B;
      ^
      1 error
      %

      ###@###.### 1999-06-08

      This bug is cause of failure JCK build:
      cd classes ; make build
      /usr/bin/grep '^src/share/classes/javasoft/sqe/jck_internal/' ../../JCK-runtime-api/files.lst | /usr/bin/sed -e '/\.java$/b' -e d > files-internal.lst
      precompile internal libraries
      CLASSPATH=../../JCK-runtime-api/classes:../../../src/share/classes:/opt/build13/2.0zn/jmpp.jar:/opt/build13/2.0zn/jckutils.jar:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar:/opt/build13/jdk1.3/G/solaris/lib/tools.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../JCK-runtime-api/classes `cat files-internal.lst | /usr/bin/sed -e "s|^|../../../|"`
      echo internal libraries precompiled at `date` > precompile-internal.ok
      /usr/bin/grep '^src/share/classes/javasoft/' ../../JCK-runtime-api/files.lst | /usr/bin/grep -v '/jck_internal/' | /usr/bin/sed -e '/\.java$/b' -e d > files-javasoft.lst
      echo "`pwd` copy-files-javasoft.ok" > copy-files-javasoft.tim
      echo "Start: `date`" >> copy-files-javasoft.tim
      ../../JCK-runtime-api/install ../../.. ../../../../jck13-tests-build/JCK-runtime-api-13 - < files-javasoft.lst
      echo "End: `date`" >> copy-files-javasoft.tim
      echo copied files-javasoft files at `date` > copy-files-javasoft.ok
      precompile shared test libraries
      CLASSPATH=../../../../jck13-tests-build/JCK-runtime-api-13/classes:../../../../jck13-tests-build/JCK-runtime-api-13/javatest.jar /opt/build13/jdk1.3/G/solaris/bin/javac -d ../../../../jck13-tests-build/JCK-runtime-api-13/classes `cat files-javasoft.lst | /usr/bin/sed -e "s|^|../../../|"`
      ../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc.java:40: class javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with package of same name
      public class ActivationGroupDesc extends StreamObjectClass
             ^
      ../../../src/share/classes/javasoft/sqe/serial/spec/java/rmi/activation/ActivationGroupDesc/CommandEnvironment.java:27: package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc clashes with class of same name
      package javasoft.sqe.serial.spec.java.rmi.activation.ActivationGroupDesc;
      ^
      Note: Some input files use or override a deprecated API. Recompile with -deprecation for details.
      2 errors
      *** Error code 1
      make: Fatal error: Command failed for target `precompile-javasoft.ok'
      Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api/classes
      *** Error code 1
      make: Fatal error: Command failed for target `classes'
      Current working directory /opt/build13/jck13-tests/build/JCK-runtime-api
      *** Error code 1
      make: Fatal error: Command failed for target `JCK-runtime-api'

            wmaddoxsunw William Maddox (Inactive)
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: