Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Log4j Java 9+ Module not found by Eclipse(Discovering Java modules)
Log4j Java 9+ Module not found by Eclipse [message #1791195] Mon, 25 June 2018 19:35 Go to next message
Sverre Moe is currently offline Sverre MoeFriend
Messages: 35
Registered: September 2012
Member
I thought at first Log4j 2.x wasn't an Java module, and it does not have an Automatic-Module-Name.

It appears that Log4j API is a Java Module with an module-info.class.
Even though log4j-api.jar is on the project modulepath in eclipse, Eclipse cannot find that module.

The module-info.class is not in the placed at the package root, but at META-INF/versions/9/
Because of this Eclipse cannot find out that Log4j is a Java Module.

Is this a known problem with Eclipse?

Eclipse Java EE IDE for Web Developers.
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200

Building with gradle works fine. Gradle finds the log4j module.
I had to write the logging code without the support of Eclipse IDE and that was a real pain.


module-info.java
module no.djviking.movies {

    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.web;
    requires javafx.graphics;

    requires org.apache.logging.log4j;
}

org.apache.logging.log4j cannot be resolved to a module

import org.apache.logging.log4j.Logger;
class MoviesApplication {

The type org.apache.logging.log4j.Logger is not accessible
Re: Log4j Java 9+ Module not found by Eclipse [message #1791212 is a reply to message #1791195] Tue, 26 June 2018 05:32 Go to previous message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 76
Registered: February 2010
Location: Bangalore, India
Member
Created Bug 536273 . https://bugs.eclipse.org/bugs/show_bug.cgi?id=536273http://



Sarika Sinha
JDT Programmer
Previous Topic:Update site for Target Management is down
Next Topic:Focus losing when .xml file opened with CTRL-SHIFT-R
Goto Forum:
  


Current Time: Mon Sep 24 10:04:15 GMT 2018

Powered by FUDForum. Page generated in 0.06362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top