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

JShell: classes in default package not visible on --class-path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 9
    • tools
    • None

      /w/z/dev 1067>> cat Bar.java
      class Bar {
          public static void main(String[] args) {
             System.out.println(new Foo());
          }
      }

      /w/z/dev 1068>> javac -classpath /tmp/f Bar.java
      /w/z/dev 1069>> java -classpath /tmp/f:. Bar
      Foo@60616364
      /w/z/dev 1070>> ./build/linux-x86_64-normal-server-release/images/jdk/bin/jshell --class-path /tmp/f
      | Welcome to JShell -- Version 9-internal
      | For an introduction type: /help intro

      jshell> new Foo()
      | Error:
      | cannot find symbol
      | symbol: class Foo
      | new Foo()
      | ^-^

            jlahoda Jan Lahoda
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: