GithubHelp home page GithubHelp logo

java.lang.NoClassDefFoundError: sun.font.SunFontManager exception when moving from oracle jdk 8 to corretto jdk 1.8.0_362. about corretto-8 HOT 9 OPEN

sagar21304 avatar sagar21304 commented on August 19, 2024
java.lang.NoClassDefFoundError: sun.font.SunFontManager exception when moving from oracle jdk 8 to corretto jdk 1.8.0_362.

from corretto-8.

Comments (9)

benty-amzn avatar benty-amzn commented on August 19, 2024

I've done a quick local test and wasn't able to reproduce this issue.
The class is part of corretto-8, located at SunFontManager.java.

Is there any additional information you can share that might help reproduce the issue? A minimal code snippet and any command line flags you're using to launch your application might help.

from corretto-8.

sagar21304 avatar sagar21304 commented on August 19, 2024

Thank you for quick analysis and response. Yes. I also verified that SunFontmanager is part of corretto 8 jdk.
But question is, is it part of corretto-8 jre? I mean is it packaged into corretto 8 jre?
If yes. In which dll or jar or exe it is packaged? If no, what would be feasible way to resolve this issue? could you confirm?
When I am compiling a jar with "1.8.0_362" corretto jdk and using corretto 11 jre , its working fine. But it's not working with same version of "1.8.0_362" corretto jre.
Is there any specific setting or configuration or package or font related stuff is required?

from corretto-8.

sagar21304 avatar sagar21304 commented on August 19, 2024

One more input: This an runtime exception i am getting. I am able to compile code successfully.

from corretto-8.

eastig avatar eastig commented on August 19, 2024

Hi @sagar21304
I checked https://corretto.aws/downloads/resources/8.372.07.1/amazon-corretto-8.372.07.1-windows-x86-jre.zip.
SunFontManager class is present in lib/rt.jar:

rt.jar/uzip://sun/font:
SunFontManager.class 48857 Apr 17 23:01

You need to check how you run your application, especially whether you redefine classpaths.

from corretto-8.

sagar21304 avatar sagar21304 commented on August 19, 2024

Hi @eastig,

Thank you for your input. What should be the classpath to access SunFontManager.class? Could you please confirm?

from corretto-8.

sagar21304 avatar sagar21304 commented on August 19, 2024

Hi @eastig, there is no change in classpath. Is there any specific change required for corretto 8 classpath?

We are loading a jar file using jni api in c++ apllcation.This a classpath passing to jvm.
Djava.class.path=..\lib;..\lib\VCSGui.jar;..\lib\VxHelpViewer.jar;..\jre\lib\rt.jar;..\lib\gui_images.jar;
..\lib\sounds.jar;..\lib\VxHelpViewerl10n.jar;..\lang;C:\Program Files (x86)\VVVVVV\Cluster Manager\EAT\bin\AtWrapper.jar

Its working fine with corretto 11 jre. But its not working with corretto 8 jre. Is there anything specific to corretto 8?

from corretto-8.

eastig avatar eastig commented on August 19, 2024

Hi @sagar21304,

Do you use JNI_CreateJavaVM?

I think you might have some configuration issues with it.

Djava.class.path=..\lib;..\lib\VCSGui.jar;..\lib\VxHelpViewer.jar;..\jre\lib\rt.jar;..\lib\gui_images.jar;

I see you have rt.jar in the java.class.path. rt.jar is a Java system jar file and java.class.path is not intended for it. java.class.path is for user's classes/jars.

Can you trace class loading?

from corretto-8.

eastig avatar eastig commented on August 19, 2024

Is there anything specific to corretto 8?

There is nothing specific regarding classpath needed for corretto 8.

from corretto-8.

sagar21304 avatar sagar21304 commented on August 19, 2024

Hi @eastig,

Thank you for your response. Yes. We are using JNI_CreateJavaVM. After removing rt.jar from the java.class.path its not working with corretto 8 jre.

from corretto-8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.