Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too aggressive minimizejre: Breaks Gdx.app.getPreferences #6

Closed
n3o59hf opened this issue May 5, 2014 · 2 comments
Closed

Too aggressive minimizejre: Breaks Gdx.app.getPreferences #6

n3o59hf opened this issue May 5, 2014 · 2 comments

Comments

@n3o59hf
Copy link

n3o59hf commented May 5, 2014

Problem happens only with minimizejre: true.

Used JRE: openjdk-1.7.0-u40-unofficial-windows-i586-image.zip

Application throws exception

    javax.xml.parsers.FactoryConfigurationError: Provider com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl not found
            at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
            at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:92)
            at java.util.XMLUtils.load(XMLUtils.java:74)
            at java.util.Properties.loadFromXML(Properties.java:868)
            at com.badlogic.gdx.backends.lwjgl.LwjglPreferences.<init>(LwjglPreferences.java:51)
            at com.badlogic.gdx.backends.lwjgl.LwjglPreferences.<init>(LwjglPreferences.java:41)
            at com.badlogic.gdx.backends.lwjgl.LwjglApplication.getPreferences(LwjglApplication.java:307)
            at com.redacted.w.data.DataStorage.<init>(DataStorage.java:35)
            at com.redacted.w.MainApp.create(MainApp.java:132)
            at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
            at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
    Caused by: java.lang.ClassNotFoundException: com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:270)
            at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:123)
            at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:178)
            at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147)
            at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:265)
            at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
            ... 10 more

on accessing preferences by using Gdx.app.getPreferences("name")

Userful comment from @tommyettinger on IRC:

<TEttinger> comment out this line and I think that should enable the dependencies of prefs.  it may need others
<TEttinger> https://github.com/libgdx/packr/blob/master/src/main/java/com/badlogicgames/packr/Packr.java#L189
@tommyettinger
Copy link
Member

Yep, that's me. It could be useful at some point to stick the minimization of a JRE in its own config file; in particular when @alexkasko gets an OpenJDK 8 JRE out, the contents of rt.jar may change.

@badlogic
Copy link
Member

Fixed by letting folks specify their own minimization config.

karlsabo pushed a commit that referenced this issue Sep 9, 2020
Instead of being hard coded, load the msvcr*.dll that came with the JRE

References #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants