Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » java.util.logging is not accessible(following ibm java tutorial, java.util.logging is not accessible)
java.util.logging is not accessible [message #1826486] Sat, 25 April 2020 17:56 Go to next message
james rollinson is currently offline james rollinsonFriend
Messages: 2
Registered: April 2020
Junior Member
I am a cobol mainframe developer, now following the Feb 2020 ibm java tutorial using eclipse & adoptopenjdk.
in unit 5 .....developer.ibm.com/tutorials/j-introtojava2/ the sample codes
import java.util.logging.Logger;
//...
Logger l = Logger.getLogger(getClass().getName());
and I get this message java.util.logging is not accessible.
my PATH is PATH=C:\Program Files\AdoptOpenJDK\jdk-11.0.7.10-openj9\bin;
eclipse version is Eclipse IDE for Java Developers
Version: 2020-03 (4.15.0)
Build id: 20200313-1211
Question: why can't the java compiler find this logger routine?
The build path for this class has the library JRE system library [javaSE-11] with e.g. java.desktop, java.naming but no java.logging .

Help !
26th April
I also tried compiling from the command line, similar problem I think:
C:\Users\jroll\eclipse-workspace\Hello World\src\com\makotojava\intro>javac Person.java
Person.java:5: error: cannot find symbol
Logger l = Logger.getlogger(Person.class.getName());
^
symbol: class Logger
location: class Person
Person.java:5: error: cannot find symbol
Logger l = Logger.getlogger(Person.class.getName());
^
symbol: variable Logger
location: class Person
2 errors

C:\Users\jroll\eclipse-workspace\Hello World\src\com\makotojava\intro>java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.20.0, JRE 11 Windows 10 amd64-64-Bit Compressed References 20200416_544 (JIT enabled, AOT enabled)
OpenJ9 - 05fa2d361
OMR - d4365f371
JCL - 838028fc9d based on jdk-11.0.7+10)

C:\Users\jroll\eclipse-workspace\Hello World\src\com\makotojava\intro>

[Updated on: Sun, 26 April 2020 08:09]

Report message to a moderator

Re: java.util.logging is not accessible [message #1826614 is a reply to message #1826486] Mon, 27 April 2020 18:17 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

If your source folder contains a module-info.java file that you didn't intentionally create, remove it.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: java.util.logging is not accessible [message #1826668 is a reply to message #1826614] Tue, 28 April 2020 14:15 Go to previous message
james rollinson is currently offline james rollinsonFriend
Messages: 2
Registered: April 2020
Junior Member
Dear Nitin,
I won't ask you why that did the trick, I just say 'Thanks' and I will keep on with the IBM eclipse-based tutorial. I had given up and moved to a command-line based tutorial.
James
Previous Topic:installing eclipse
Next Topic:Oomph Preferences and User Storage
Goto Forum:
  


Current Time: Thu Apr 25 05:45:36 GMT 2024

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

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

Back to the top