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

LinkageError: attempted duplicate class definition when --loader-per-compiler=false

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 8
    • 8
    • core-libs
    • None
    • b100
    • generic
    • generic

    Description

       jjs --loader-per-compile=false
      jjs> x = 3
      3
      jjs> x++
      Exception in thread "main" java.lang.LinkageError: loader (instance of jdk/nashorn/internal/runtime/ScriptLoader): attempted duplicate class definition for name: "jdk/nashorn/internal/scripts/Script$\^shell\_"
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:752)
      at jdk.nashorn.internal.runtime.ScriptLoader.installClass(ScriptLoader.java:62)
      at jdk.nashorn.internal.runtime.Context$ContextCodeInstaller.install(Context.java:91)
      at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:408)
      at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:447)
      at jdk.nashorn.internal.runtime.Context.compile(Context.java:800)
      at jdk.nashorn.internal.runtime.Context.eval(Context.java:372)
      at jdk.nashorn.tools.Shell.readEvalPrint(Shell.java:439)
      at jdk.nashorn.tools.Shell.run(Shell.java:167)
      at jdk.nashorn.tools.Shell.main(Shell.java:142)
      at jdk.nashorn.tools.Shell.main(Shell.java:121)

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: