xpenatan/gdx-teavm

Methods setFullscreenMode and setWindowedMode dont work

aallnneess opened this issue · 12 comments

Hello :-)

i use a Scene2d clicklistener to change from fullscreen to windowed and back.
Unfortunately this code has no function here:

  • Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
  • Gdx.graphics.setWindowedMode(800,600);
    private void infoTable() {

        if (infoButton.getClickListener().isPressed()) {
            infoTable.setVisible(true);
        }

        if (okButton.getClickListener().isPressed()) {
            infoTable.setVisible(false);

            if (Objects.equals(screensize.getSelected().toString(), "FullScreen")) {
                Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
            }

            if (Objects.equals(screensize.getSelected().toString(), "Windowed")) {
                Gdx.graphics.setWindowedMode(800,600);
            }
        }

    }

Hi, I just commited 7073391
Please check if its working.

Hello,

i cant check it becouse, since last commited i get some errors: (i dont get this issues with same jar file yesterday)

| Not Accepted Libs ClassPath
|
#################################################################
| 0 false: /C:/GitHub/new%20gdx-html5-tools/examples/core/teavm/build/classes/java/main/
| 1 false: /C:/GitHub/new%20gdx-html5-tools/examples/core/teavm/build/resources/main
| 2 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.servlet/javax.servlet-api/3.1.0/3cd63d075497751784b2fa84be59432f4905bf7c/javax.servlet-api-3.1.0.jar
| 3 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.websocket/javax.websocket-api/1.0/fc843b649d4a1dcb0497669d262befa3918c7ba8/javax.websocket-api-1.0.jar
| 4 false: /C:/GitHub/new%20gdx-html5-tools/backends/backend-teavm/libs/teavm-cli-0.7.0-dev-1200.jar
|||||||||||||||||||||||||||||||||
#################################################################
|
| COMPILING
|
#################################################################
#################################################################
|
| Compiler problems
|
#################################################################
| ERROR[0]
| Class: com/badlogic/gdx/utils/SharedLibraryLoader.java:120
| Method: com.badlogic.gdx.utils.SharedLibraryLoader.load(Ljava/lang/String;)V
| Text: Method java.lang.System.loadLibrary(Ljava/lang/String;)V was not found
| 
| ----
| 
| ERROR[1]
| Class: com/badlogic/gdx/utils/SharedLibraryLoader.java:318
| Method: com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(Ljava/lang/String;)V
| Text: Method java.lang.System.load(Ljava/lang/String;)V was not found
| 
| ----
| 
| ERROR[2]
| Class: com/badlogic/gdx/utils/SharedLibraryLoader.java:328
| Method: com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/lang/Throwable;
| Text: Method java.lang.System.load(Ljava/lang/String;)V was not found
| 
| ----
| 
| ERROR[3]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Joint.jniGetBodyB(J)J
| Text: Native method com.badlogic.gdx.physics.box2d.Joint.jniGetBodyB(J)J has no implementation
| 
| ----
| 
| ERROR[4]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.joints.MouseJoint.jniSetTarget(JFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.joints.MouseJoint.jniSetTarget(JFF)V has no implementation
| 
| ----
| 
| ERROR[5]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.newWorld(FFZ)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.newWorld(FFZ)J has no implementation
| 
| ----
| 
| ERROR[6]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateBody(JIFFFFFFFFZZZZZF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateBody(JIFFFFFFFFZZZZZF)J has no implementation
| 
| ----
| 
| ERROR[7]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniDestroyBody(JJ)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniDestroyBody(JJ)V has no implementation
| 
| ----
| 
| ERROR[8]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniDestroyFixture(JJJ)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniDestroyFixture(JJJ)V has no implementation
| 
| ----
| 
| ERROR[9]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateWheelJoint(JJJZFFFFFFZFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateWheelJoint(JJJZFFFFFFZFFFF)J has no implementation
| 
| ----
| 
| ERROR[10]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateRopeJoint(JJJZFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateRopeJoint(JJJZFFFFF)J has no implementation
| 
| ----
| 
| ERROR[11]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateDistanceJoint(JJJZFFFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateDistanceJoint(JJJZFFFFFFF)J has no implementation
| 
| ----
| 
| ERROR[12]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateFrictionJoint(JJJZFFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateFrictionJoint(JJJZFFFFFF)J has no implementation
| 
| ----
| 
| ERROR[13]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateGearJoint(JJJZJJF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateGearJoint(JJJZJJF)J has no implementation
| 
| ----
| 
| ERROR[14]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateMotorJoint(JJJZFFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateMotorJoint(JJJZFFFFFF)J has no implementation
| 
| ----
| 
| ERROR[15]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateMouseJoint(JJJZFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateMouseJoint(JJJZFFFFF)J has no implementation
| 
| ----
| 
| ERROR[16]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreatePrismaticJoint(JJJZFFFFFFFZFFZFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreatePrismaticJoint(JJJZFFFFFFFZFFZFF)J has no implementation
| 
| ----
| 
| ERROR[17]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreatePulleyJoint(JJJZFFFFFFFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreatePulleyJoint(JJJZFFFFFFFFFFF)J has no implementation
| 
| ----
| 
| ERROR[18]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateRevoluteJoint(JJJZFFFFFZFFZFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateRevoluteJoint(JJJZFFFFFZFFZFF)J has no implementation
| 
| ----
| 
| ERROR[19]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniCreateWeldJoint(JJJZFFFFFFF)J
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniCreateWeldJoint(JJJZFFFFFFF)J has no implementation
| 
| ----
| 
| ERROR[20]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniDestroyJoint(JJ)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniDestroyJoint(JJ)V has no implementation
| 
| ----
| 
| ERROR[21]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniStep(JFII)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniStep(JFII)V has no implementation
| 
| ----
| 
| ERROR[22]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniSetGravity(JFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniSetGravity(JFF)V has no implementation
| 
| ----
| 
| ERROR[23]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniQueryAABB(JFFFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniQueryAABB(JFFFF)V has no implementation
| 
| ----
| 
| ERROR[24]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniDispose(J)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniDispose(J)V has no implementation
| 
| ----
| 
| ERROR[25]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.World.jniRayCast(JFFFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.World.jniRayCast(JFFFF)V has no implementation
| 
| ----
| 
| ERROR[26]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Shape.jniGetRadius(J)F
| Text: Native method com.badlogic.gdx.physics.box2d.Shape.jniGetRadius(J)F has no implementation
| 
| ----
| 
| ERROR[27]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Shape.jniSetRadius(JF)V
| Text: Native method com.badlogic.gdx.physics.box2d.Shape.jniSetRadius(JF)V has no implementation
| 
| ----
| 
| ERROR[28]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Shape.jniDispose(J)V
| Text: Native method com.badlogic.gdx.physics.box2d.Shape.jniDispose(J)V has no implementation
| 
| ----
| 
| ERROR[29]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Shape.jniGetType(J)I
| Text: Native method com.badlogic.gdx.physics.box2d.Shape.jniGetType(J)I has no implementation
| 
| ----
| 
| ERROR[30]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.CircleShape.newCircleShape()J
| Text: Native method com.badlogic.gdx.physics.box2d.CircleShape.newCircleShape()J has no implementation
| 
| ----
| 
| ERROR[31]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.CircleShape.jniSetPosition(JFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.CircleShape.jniSetPosition(JFF)V has no implementation
| 
| ----
| 
| ERROR[32]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.EdgeShape.newEdgeShape()J
| Text: Native method com.badlogic.gdx.physics.box2d.EdgeShape.newEdgeShape()J has no implementation
| 
| ----
| 
| ERROR[33]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.EdgeShape.jniGetVertex1(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.EdgeShape.jniGetVertex1(J[F)V has no implementation
| 
| ----
| 
| ERROR[34]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.EdgeShape.jniGetVertex2(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.EdgeShape.jniGetVertex2(J[F)V has no implementation
| 
| ----
| 
| ERROR[35]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniCreateFixture(JJFFFZSSS)J
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniCreateFixture(JJFFFZSSS)J has no implementation
| 
| ----
| 
| ERROR[36]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniSetTransform(JFFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniSetTransform(JFFF)V has no implementation
| 
| ----
| 
| ERROR[37]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetTransform(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetTransform(J[F)V has no implementation
| 
| ----
| 
| ERROR[38]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetPosition(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetPosition(J[F)V has no implementation
| 
| ----
| 
| ERROR[39]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetAngle(J)F
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetAngle(J)F has no implementation
| 
| ----
| 
| ERROR[40]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetWorldCenter(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetWorldCenter(J[F)V has no implementation
| 
| ----
| 
| ERROR[41]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniSetLinearVelocity(JFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniSetLinearVelocity(JFF)V has no implementation
| 
| ----
| 
| ERROR[42]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetLinearVelocity(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetLinearVelocity(J[F)V has no implementation
| 
| ----
| 
| ERROR[43]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniApplyForceToCenter(JFFZ)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniApplyForceToCenter(JFFZ)V has no implementation
| 
| ----
| 
| ERROR[44]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetMassData(J[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetMassData(J[F)V has no implementation
| 
| ----
| 
| ERROR[45]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniSetMassData(JFFFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniSetMassData(JFFFF)V has no implementation
| 
| ----
| 
| ERROR[46]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Body.jniGetWorldPoint(JFF[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.Body.jniGetWorldPoint(JFF[F)V has no implementation
| 
| ----
| 
| ERROR[47]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.ChainShape.newChainShape()J
| Text: Native method com.badlogic.gdx.physics.box2d.ChainShape.newChainShape()J has no implementation
| 
| ----
| 
| ERROR[48]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.ChainShape.jniCreateLoop(J[FII)V
| Text: Native method com.badlogic.gdx.physics.box2d.ChainShape.jniCreateLoop(J[FII)V has no implementation
| 
| ----
| 
| ERROR[49]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.ChainShape.jniCreateChain(J[FII)V
| Text: Native method com.badlogic.gdx.physics.box2d.ChainShape.jniCreateChain(J[FII)V has no implementation
| 
| ----
| 
| ERROR[50]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.ChainShape.jniGetVertexCount(J)I
| Text: Native method com.badlogic.gdx.physics.box2d.ChainShape.jniGetVertexCount(J)I has no implementation
| 
| ----
| 
| ERROR[51]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.ChainShape.jniGetVertex(JI[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.ChainShape.jniGetVertex(JI[F)V has no implementation
| 
| ----
| 
| ERROR[52]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniGetShape(J)J
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniGetShape(J)J has no implementation
| 
| ----
| 
| ERROR[53]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniSetSensor(JZ)V
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniSetSensor(JZ)V has no implementation
| 
| ----
| 
| ERROR[54]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniIsSensor(J)Z
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniIsSensor(J)Z has no implementation
| 
| ----
| 
| ERROR[55]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniSetFilterData(JSSS)V
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniSetFilterData(JSSS)V has no implementation
| 
| ----
| 
| ERROR[56]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniGetFilterData(J[S)V
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniGetFilterData(J[S)V has no implementation
| 
| ----
| 
| ERROR[57]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniTestPoint(JFF)Z
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniTestPoint(JFF)Z has no implementation
| 
| ----
| 
| ERROR[58]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Fixture.jniGetDensity(J)F
| Text: Native method com.badlogic.gdx.physics.box2d.Fixture.jniGetDensity(J)F has no implementation
| 
| ----
| 
| ERROR[59]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Contact.jniGetFixtureA(J)J
| Text: Native method com.badlogic.gdx.physics.box2d.Contact.jniGetFixtureA(J)J has no implementation
| 
| ----
| 
| ERROR[60]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Contact.jniGetFixtureB(J)J
| Text: Native method com.badlogic.gdx.physics.box2d.Contact.jniGetFixtureB(J)J has no implementation
| 
| ----
| 
| ERROR[61]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.Contact.jniSetFriction(JF)V
| Text: Native method com.badlogic.gdx.physics.box2d.Contact.jniSetFriction(JF)V has no implementation
| 
| ----
| 
| ERROR[62]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.PolygonShape.newPolygonShape()J
| Text: Native method com.badlogic.gdx.physics.box2d.PolygonShape.newPolygonShape()J has no implementation
| 
| ----
| 
| ERROR[63]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.PolygonShape.jniSet(J[FII)V
| Text: Native method com.badlogic.gdx.physics.box2d.PolygonShape.jniSet(J[FII)V has no implementation
| 
| ----
| 
| ERROR[64]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.PolygonShape.jniSetAsBox(JFFFFF)V
| Text: Native method com.badlogic.gdx.physics.box2d.PolygonShape.jniSetAsBox(JFFFFF)V has no implementation
| 
| ----
| 
| ERROR[65]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.PolygonShape.jniGetVertexCount(J)I
| Text: Native method com.badlogic.gdx.physics.box2d.PolygonShape.jniGetVertexCount(J)I has no implementation
| 
| ----
| 
| ERROR[66]
| Class: -
| Method: com.badlogic.gdx.physics.box2d.PolygonShape.jniGetVertex(JI[F)V
| Text: Native method com.badlogic.gdx.physics.box2d.PolygonShape.jniGetVertex(JI[F)V has no implementation

#################################################################

BUILD SUCCESSFUL in 1m 23s

If i try to open it in browser:

 java.lang.RuntimeException: (JavaScript) TypeError: Cannot read properties of null (reading '$startsWith')
        
       Uncaught TypeError: Cannot read properties of null (reading '$startsWith')
    at cbgu_SharedLibraryLoader__clinit_ (app.js:21288)
    at cbgu_SharedLibraryLoader_$callClinit (app.js:20935)
    at cbgu_SharedLibraryLoader__init_0 (app.js:20943)
    at cbgu_SharedLibraryLoader__init_ (app.js:20939)
    at cbgpb_World__clinit_ (app.js:52341)
    at cbgpb_World_$callClinit (app.js:52088)
    at cbgpb_World__init_0 (app.js:52097)
    at cbgpb_World__init_ (app.js:52092)
    at grer_SceneConfiguration_getWorld (app.js:45008)
    at grer_SceneConfiguration.$getWorld0 (app.js:554)

My TeaVm Hyperlap build file:

package com.github.xpenatan.gdx.examples.teavm;

import com.github.xpenatan.gdx.backends.teavm.TeaBuildConfiguration;
import com.github.xpenatan.gdx.backends.teavm.TeaBuilder;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

public class HyperLap2DTest {

    public static void main(String[] args) {
        URL appJarAppUrl = null;
        try {
            appJarAppUrl = new File("c:/GitHub/new gdx-html5-tools/everrun1.jar").toURI().toURL();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        TeaBuildConfiguration teaBuildConfiguration = new TeaBuildConfiguration();
        teaBuildConfiguration.assetsPath.add(new File("c:/GitHub/new liftoff/assets"));
        teaBuildConfiguration.webappPath = new File("c:/GitHub/new gdx-html5-tools").getAbsolutePath();
        teaBuildConfiguration.obfuscate = false;
        teaBuildConfiguration.mainApplicationClass = "com.tutorial.artemisTestlab.GameMain";
        teaBuildConfiguration.additionalClasspath.add(appJarAppUrl);

        teaBuildConfiguration.reflectionInclude.add("games.rednblack.editor.renderer");
        teaBuildConfiguration.reflectionInclude.add("games.rednblack.h2d.extension.spine");
        teaBuildConfiguration.reflectionInclude.add("games.rednblack.h2d.extension.talos");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.components");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.systems");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.Scripts");
        teaBuildConfiguration.reflectionInclude.add("com.ray3k.stripe.scenecomposer");



        teaBuildConfiguration.reflectionInclude.add("com.artemis");
        teaBuildConfiguration.reflectionInclude.add("com.talosvfx.talos.runtime");

        teaBuildConfiguration.reflectionExclude.add("com.artemis.annotation");
        teaBuildConfiguration.reflectionExclude.add("com.artemis.utils.reflect");
        TeaBuilder.build(teaBuildConfiguration);
    }
}

Hi, Sorry, I removed box2d-gwt implementation from backend-web. For some reason I forgot in there and its now removed.

Your teavm module should include implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$project.gdxVersion"

Hey, thanks.

Sadly it doesnt work and idk how to fix :-/

#################################################################
|
| DEPENDENCY_ANALYSIS
|
#################################################################
||||||||||||||||||||||||||||||#################################################################
|
| Compiler problems
|
#################################################################
| ERROR[0]
| Class: -
| Method: com.artemis.utils.reflect.Field.getElementType(Ljava/lang/Class;Ljava/lang/String;I)Ljava/lang/Class;
| Text: Error calling proxy method com.artemis.utils.reflect.Field.getElementType(Lorg/teavm/metaprogramming/ReflectClass;Lorg/teavm/metaprogramming/Value;Lorg/teavm/metaprogramming/Value;)V: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.teavm.metaprogramming.impl.UsageGenerator.emitPermutation(UsageGenerator.java:159)
	at org.teavm.metaprogramming.impl.UsageGenerator.lambda$installProxyEmitter$0(UsageGenerator.java:84)
	at <unknown class>.consume(Unknown Source)
	at org.teavm.dependency.DependencyAnalyzer.schedulePropagation(DependencyAnalyzer.java:373)
	at org.teavm.dependency.DependencyNode.scheduleMultipleTypes(DependencyNode.java:215)
	at org.teavm.dependency.DependencyNode.propagate(DependencyNode.java:144)
	at org.teavm.dependency.DependencyNode.connectWithoutChildNodes(DependencyNode.java:320)
	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:271)
	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:394)
	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:278)
	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:394)
	at org.teavm.dependency.VirtualCallConsumer.consume(VirtualCallConsumer.java:91)
	at org.teavm.dependency.DependencyAnalyzer.lambda$schedulePropagation$3(DependencyAnalyzer.java:312)
	at org.teavm.dependency.DependencyAnalyzer$$Lambda$84/0x0000000000000000.run(Unknown Source)
	at org.teavm.dependency.DependencyAnalyzer.processQueue(DependencyAnalyzer.java:646)
	at org.teavm.dependency.DependencyAnalyzer.processDependencies(DependencyAnalyzer.java:683)
	at org.teavm.vm.TeaVM.build(TeaVM.java:379)
	at com.github.xpenatan.gdx.backends.teavm.CustomTeaVMTool.generate(CustomTeaVMTool.java:402)
	at com.github.xpenatan.gdx.backends.teavm.TeaBuilder.build(TeaBuilder.java:201)
	at com.github.xpenatan.gdx.backends.teavm.TeaBuilder.build(TeaBuilder.java:37)
	at com.github.xpenatan.gdx.examples.teavm.HyperLap2DTest.main(HyperLap2DTest.java:46)
Caused by: java.lang.NullPointerException
	at com.artemis.utils.reflect.Field.getElementType(Field.java:131)
	... 24 more
My TeaBuilder class:

    public static void main(String[] args) {
        URL appJarAppUrl = null;
        try {
            appJarAppUrl = new File("c:/GitHub/new gdx-html5-tools/everrun1.jar").toURI().toURL();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        TeaBuildConfiguration teaBuildConfiguration = new TeaBuildConfiguration();
        teaBuildConfiguration.assetsPath.add(new File("c:/GitHub/new liftoff/assets"));
        teaBuildConfiguration.webappPath = new File("c:/GitHub/new gdx-html5-tools").getAbsolutePath();
        teaBuildConfiguration.obfuscate = false;
        teaBuildConfiguration.mainApplicationClass = "com.tutorial.artemisTestlab.GameMain";
        teaBuildConfiguration.additionalClasspath.add(appJarAppUrl);

        teaBuildConfiguration.reflectionInclude.add("games.rednblack.editor.renderer");
        teaBuildConfiguration.reflectionInclude.add("games.rednblack.h2d.extension.spine");
        teaBuildConfiguration.reflectionInclude.add("games.rednblack.h2d.extension.talos");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.components");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.systems");
        teaBuildConfiguration.reflectionInclude.add("com.tutorial.artemisTestlab.Scripts");
        teaBuildConfiguration.reflectionInclude.add("com.ray3k.stripe.scenecomposer");

        teaBuildConfiguration.reflectionInclude.add("com.artemis");
        teaBuildConfiguration.reflectionInclude.add("com.talosvfx.talos.runtime");

        teaBuildConfiguration.reflectionExclude.add("com.artemis.annotation");
        teaBuildConfiguration.reflectionExclude.add("com.artemis.utils.reflect");
        teaBuildConfiguration.reflectionExclude.add("com.badlogicgames.gdx:gdx-box2d-gwt:$project.gdxVersion");

        TeaBuilder.build(teaBuildConfiguration);
    }

Libgdx jar works great in desktop/android/gwt plattform

ups, teaBuildConfiguration.reflectionExclude.add("com.badlogicgames.gdx:gdx-box2d-gwt:$project.gdxVersion"); is wrong

okay, but i also had this dependencie:

dependencies {
  implementation project(":backends:backend-web")
  implementation project(":backends:backend-teavm")
  implementation project(":extensions:gdx-freetype-teavm")
  implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$project.gdxVersion"
  implementation "com.badlogicgames.gdx:gdx:$project.gdxVersion"
  implementation project(":examples:core:core")
}

i removed the wrong line, but still same issue.

Hi, is the jar private ? do you mind sharing so I can figure it out ?
Something with the emulated 'com.artemis.utils.reflect.Field' stopped working for some reason

Hi @aallnneess. I downloaded the assets from your github and used the same TeaBuilder configuration and it worked. I used the class from the example: examples\core\teavm\src\main\java\com\github\xpenatan\gdx\examples\teavm\HyperLap2DTest.java

image

Are you using the last commit ?

hm. i use the latest commit and same class as you, but still same issues. but then the problem is my congif, so i have to look deeper....

Edit:

And i have still these Not Accepted Libs ClassPaths:

#################################################################
|
| Not Accepted Libs ClassPath
|
#################################################################
| 0 false: /C:/GitHub/new%20gdx-html5-tools/examples/core/teavm/build/classes/java/main/
| 1 false: /C:/GitHub/new%20gdx-html5-tools/examples/core/teavm/build/resources/main
| 2 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar
| 3 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.servlet/javax.servlet-api/3.1.0/3cd63d075497751784b2fa84be59432f4905bf7c/javax.servlet-api-3.1.0.jar
| 4 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.websocket/javax.websocket-api/1.0/fc843b649d4a1dcb0497669d262befa3918c7ba8/javax.websocket-api-1.0.jar
| 5 false: /C:/GitHub/new%20gdx-html5-tools/backends/backend-teavm/libs/teavm-cli-0.7.0-dev-1200.jar
| 6 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-box2d/1.10.0/b3a3c0f00b90716238835434d0ae8985604c37f8/gdx-box2d-1.10.0.jar
| 7 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/com.google.jsinterop/jsinterop-annotations/1.0.2/abd7319f53d018e11108a88f599bd16492448dd2/jsinterop-annotations-1.0.2.jar
| 8 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/com.google.jsinterop/jsinterop-annotations/1.0.2/33716f8aef043f2f02b78ab4a1acda6cd90a7602/jsinterop-annotations-1.0.2-sources.jar
| 9 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.0.0.GA/b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e/validation-api-1.0.0.GA.jar
| 10 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.0.0.GA/7a561191db2203550fbfa40d534d4997624cd369/validation-api-1.0.0.GA-sources.jar
| 11 false: /C:/Users/m_rau/.gradle/caches/modules-2/files-2.1/org.w3c.css/sac/1.3/cdb2dcb4e22b83d6b32b93095f644c3462739e82/sac-1.3.jar
| 

Edit 2:

i delete my rep. and clone again...

After clone repo again, it worked, thanks.

The following also works:

Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
Gdx.graphics.setWindowedMode(800,600);