#can't find referenced class java.util.logging.Level

1 messages ยท Page 1 of 1 (latest)

zinc krakenBOT
#

<@&987246399047479336> please have a look, thanks.

#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

il.logging.Level.

The error message you are encountering suggests that the class java.util.logging.Level is not found. This class is part of the Java standard library and should be available by default.

Here are a few possible solutions:

  1. Check your Java version: Make sure you have a compatible version of Java installed on your system. The java.util.logging.Level class is available starting from Java 1.4, so ensure that you have a suitable version.

  2. Verify your classpath: Ensure that your project's classpath is correctly set up to include the necessary libraries and dependencies. If you are using an IDE, check the build path or dependencies settings to make sure the required libraries are included.

  3. Update your JDK: If you have an older version of Java installed, consider updating to a newer version to ensure that all required classes are available.

  4. Check for conflicting dependencies: It's possible that there may be conflicting dependencies in your project that are causing this issue. Make sure there are no duplicate or conflicting versions of the logging library in your project.

  5. Rebuild and clean your project: Sometimes, rebuilding and cleaning your project can resolve classpath-related issues. Try cleaning and rebuilding your project before running ProGuard again.

If none of these solutions work, please provide more details about your development environment, such as the IDE you're using, the specific ProGuard configuration, and any other relevant information so we can assist you further.

#

Yes, you can add java.util.logging as a dependency in your Java project.

If you are using a build tool like Maven or Gradle, you can add the following dependency to your project's configuration file:

Maven:

<dependencies>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>8.0.1</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle:

dependencies {
    compileOnly 'javax:javaee-api:8.0.1'
}

This will include the java.util.logging package in your project.

Note that java.util.logging is part of the Java SE standard library, so it is usually available without any additional dependencies. However, if you are working on a Java EE or Jakarta EE project, you may need to add the above dependency to access the logging API.

#

To get the .jar dependency of java.util.logging, you can follow these steps:

  1. Open your preferred web browser and go to the Maven Central Repository website: https://mvnrepository.com/
  2. In the search bar, type "java.util.logging" and press Enter.
  3. You will see a list of results related to java.util.logging. Look for the version that matches your requirements.
  4. Click on the desired version to open its details page.
  5. On the details page, you will find a section titled "Dependency Information". It provides information about how to include this dependency in your project using different build tools like Maven, Gradle, etc.
  6. Copy the dependency code snippet for your build tool (e.g., Maven) from the "Dependency Information" section.
  7. Paste the dependency code snippet into your project's build file (e.g., pom.xml for Maven).
  8. Save the changes to your build file and let your build tool resolve and download the required .jar file.

After following these steps, you should have successfully added the .jar dependency of java.util.logging to your project.

#

Activities have been reset.

muted crescent
#

how are you launching proguard?

#

my guess is that its getting confused and not knowing that java.util.logging.Level is built in to java

spice cloud
#

this is a proguard issue

#

If you wanna run it regardless, add the -dontwarn flag

#

but I think you should report the issue

#

use the link in the warning message

#

uh what version are you running it with

#

ehh, should be fine

#

did you follow the link

#

in the warning

#

nvm found the issue

#

follow the link in the warning please

#

all the info is in there

#

^^

#

it needs a file to tell what Java version your program is using

#

because only then it knows what classes are from Java

#

For JSE, these are typically packaged in lib/rt.jar (vm.jar for IBM's JVM, and classes.jar in MacOS X) or as of Java 9, jmods/java.base.jmod

#

Uhh

#

I actually have no clue

#

but you could try that

#

It's either a separate file somewhere in the java installation folder (jmods/java.base.jmod?? never seen this)
Or just literally the java jar file yeah

#

yap

#

can't hurt anyways

#

and I think that's it

#

depends

#

is it an intellij project?

#

or do you use a build system

#

should be set in the maven file
or project structure -> project sdk

#

for maven it's set in the pom.xml

<properties>
    <maven.compiler.target>version</maven.compiler.target>
    <maven.compiler.source>version</maven.compiler.source>
</properties>
#

Default is JVM 1.6

#

yeah

#

that's it then

#

think so?

#

I'm also just going off the documentation

zinc krakenBOT
#

Activities have been reset.

muted crescent
#

rt.jar doesn't exist anymore

#

use the jmod path

#

it is in your install