I don't think you can specify different JDK:s for different modules with
IntelliJ. You can specify different source and target levels, but that
doesn't help here. Even though I set log4j-perf to 1.7, I get that error.

On Wed, Apr 26, 2017 at 4:13 PM, Ralph Goers <ralph.go...@dslextreme.com>
wrote:

> You could compile the api module with Java 9 and the rest with Java 7.
> Until the module-info.java files are added the api module is the only thing
> that has Java 9 code in it.
>
> Ralph
>
> > On Apr 26, 2017, at 6:55 AM, Mikael Ståldal <mikael.stal...@magine.com>
> wrote:
> >
> > I was able to get log4j-api to build by manually installing JDK 9 and
> > setting JDK 9 for that module. But now it fails in log4j-perf with the
> > error below.
> >
> > Maybe related to https://bugs.openjdk.java.net/browse/JDK-8152842
> >
> > Error:java: Annotation generator had thrown the exception.
> > java.lang.NoClassDefFoundError: javax/annotation/Generated
> >  at
> > org.openjdk.jmh.generators.core.BenchmarkGenerator.generateImport(
> BenchmarkGenerator.java:564)
> >  at
> > org.openjdk.jmh.generators.core.BenchmarkGenerator.generateClass(
> BenchmarkGenerator.java:522)
> >  at
> > org.openjdk.jmh.generators.core.BenchmarkGenerator.
> generate(BenchmarkGenerator.java:117)
> >  at
> > org.openjdk.jmh.generators.BenchmarkProcessor.process(
> BenchmarkProcessor.java:52)
> >  at
> > jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.
> callProcessor(JavacProcessingEnvironment.java:968)
> >  at
> > jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.
> discoverAndRunProcs(JavacProcessingEnvironment.java:884)
> >  at
> > jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.
> access$2200(JavacProcessingEnvironment.java:108)
> >  at
> > jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$
> Round.run(JavacProcessingEnvironment.java:1206)
> >  at
> > jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.
> doProcessing(JavacProcessingEnvironment.java:1315)
> >  at
> > jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(
> JavaCompiler.java:1246)
> >  at
> > jdk.compiler/com.sun.tools.javac.main.JavaCompiler.
> compile(JavaCompiler.java:922)
> >  at
> > jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.
> lambda$doCall$0(JavacTaskImpl.java:100)
> >  at
> > jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(
> JavacTaskImpl.java:142)
> >  at
> > jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.
> doCall(JavacTaskImpl.java:96)
> >  at
> > jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(
> JavacTaskImpl.java:90)
> >  at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:185)
> >  at
> > org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(
> JavaBuilder.java:475)
> >  at
> > org.jetbrains.jps.incremental.java.JavaBuilder.compile(
> JavaBuilder.java:331)
> >  at
> > org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(
> JavaBuilder.java:249)
> >  at
> > org.jetbrains.jps.incremental.java.JavaBuilder.build(
> JavaBuilder.java:213)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(
> IncProjectBuilder.java:1263)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(
> IncProjectBuilder.java:940)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(
> IncProjectBuilder.java:1012)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(
> IncProjectBuilder.java:903)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(
> IncProjectBuilder.java:736)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(
> IncProjectBuilder.java:384)
> >  at
> > org.jetbrains.jps.incremental.IncProjectBuilder.build(
> IncProjectBuilder.java:192)
> >  at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
> >  at org.jetbrains.jps.cmdline.BuildSession.runBuild(
> BuildSession.java:295)
> >  at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
> >  at
> > org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.
> lambda$channelRead0$0(BuildMain.java:236)
> >  at
> > org.jetbrains.jps.service.impl.SharedThreadPoolImpl.
> lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
> >  at
> > java.base/java.util.concurrent.Executors$RunnableAdapter.call(
> Executors.java:514)
> >  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> >  at
> > java.base/java.util.concurrent.ThreadPoolExecutor.
> runWorker(ThreadPoolExecutor.java:1161)
> >  at
> > java.base/java.util.concurrent.ThreadPoolExecutor$
> Worker.run(ThreadPoolExecutor.java:635)
> >  at java.base/java.lang.Thread.run(Thread.java:844)
> >  Caused by: java.lang.ClassNotFoundException: javax.annotation.Generated
> >  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
> >  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:540)
> >  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:473)
> >  ... 37 more
> >
> > On Wed, Apr 26, 2017 at 3:03 PM, Apache <ralph.go...@dslextreme.com>
> wrote:
> >
> >> You could try using java 9
> >>
> >> Sent from my iPad
> >>
> >>> On Apr 26, 2017, at 2:20 AM, Mikael Ståldal <mikael.stal...@magine.com
> >
> >> wrote:
> >>>
> >>> Now I cannot build the project in IntelliJ IDEA anymore. It complains
> >> that
> >>> lambda expressions are not supported in Java 7 in
> >> StackWalkerStackLocator.
> >>>
> >>> Any suggestions?
> >>>
> >>> On Fri, Apr 21, 2017 at 10:59 AM, Mikael Ståldal <
> >> mikael.stal...@magine.com>
> >>> wrote:
> >>>
> >>>> Should the vendor of the Java 7, 8 and 9 toolchains be "sun"?
> Shouldn't
> >> it
> >>>> be "oracle"?
> >>>>
> >>>>> On Fri, Apr 21, 2017 at 9:26 AM, Matt Sicker <boa...@gmail.com>
> wrote:
> >>>>>
> >>>>> 🎉🎉🎉
> >>>>>
> >>>>> On 21 April 2017 at 01:41, Ralph Goers <ralph.go...@dslextreme.com>
> >>>>> wrote:
> >>>>>
> >>>>>> I’ve pushed the support for Java 9 and Stackwalker. Java 9 is now
> >>>>> required
> >>>>>> to build Log4j in addition to Java 7.
> >>>>>>
> >>>>>> Ralph
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Matt Sicker <boa...@gmail.com>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> [image: MagineTV]
> >>>>
> >>>> *Mikael Ståldal*
> >>>> Senior software developer
> >>>>
> >>>> *Magine TV*
> >>>> mikael.stal...@magine.com
> >>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
> >>>>
> >>>> Privileged and/or Confidential Information may be contained in this
> >>>> message. If you are not the addressee indicated in this message
> >>>> (or responsible for delivery of the message to such a person), you may
> >> not
> >>>> copy or deliver this message to anyone. In such case,
> >>>> you should destroy this message and kindly notify the sender by reply
> >>>> email.
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> [image: MagineTV]
> >>>
> >>> *Mikael Ståldal*
> >>> Senior software developer
> >>>
> >>> *Magine TV*
> >>> mikael.stal...@magine.com
> >>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
> >>>
> >>> Privileged and/or Confidential Information may be contained in this
> >>> message. If you are not the addressee indicated in this message
> >>> (or responsible for delivery of the message to such a person), you may
> >> not
> >>> copy or deliver this message to anyone. In such case,
> >>> you should destroy this message and kindly notify the sender by reply
> >>> email.
> >>
> >>
> >>
> >
> >
> > --
> > [image: MagineTV]
> >
> > *Mikael Ståldal*
> > Senior software developer
> >
> > *Magine TV*
> > mikael.stal...@magine.com
> > Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
> >
> > Privileged and/or Confidential Information may be contained in this
> > message. If you are not the addressee indicated in this message
> > (or responsible for delivery of the message to such a person), you may
> not
> > copy or deliver this message to anyone. In such case,
> > you should destroy this message and kindly notify the sender by reply
> > email.
>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.stal...@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Reply via email to