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

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 9
    • Component/s: 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()
      | ^-^

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

              Created:
              Updated: