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

javax/print/StreamPrintingOrientation.java fails with IllegalAccessException

XMLWordPrintable

      The javax/print/StreamPrintingOrientation.java fails with IllegalAccessException because the class is not declared public:

      ----------messages:(7/308)----------
      command: main StreamPrintingOrientation
      reason: User specified action: run main/manual StreamPrintingOrientation
      ...
      ----------System.out:(0/0)----------
      ----------System.err:(11/881)----------
      java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainTask cannot access a member of class StreamPrintingOrientation with modifiers "public static"
      at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:398)
      at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:709)
      at java.base/java.lang.reflect.Method.invoke(Method.java:571)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1575)

      JavaTest Message: Verify that the class defining the test is
      JavaTest Message: declared public (test invoked via reflection)


      As suggested by the diagnostic messages, the class must be declared public.

      The test is declared manual, it requires the user to click OK in the Print dialog. No other interaction is required, as far as I understand.

      It would be good to display instructions for the tester.

            rkannathpari Renjith Kannath Pariyangad
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: