LibGDX Illegal Access Warning

Anything libgdx related goes here!

LibGDX Illegal Access Warning

Postby LuminousNutria » Sat Jan 12, 2019 2:59 am

Hello, I keep getting illegal access warnings when I try to run a hello world program with LibGDX. Though I can still run the program and the only problem is that the "hello world" text is off-center, I want to try and nip this problem in the bud.

When I couldn't sync with gradle before I was advised to change a line in gradle-wrapper.properties to "distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip". This allowed me to sync.

I'm not sure if this is related, but I haven't been able to successfully create a project with the "android" option checked. I did mess around this the android/Sdk file, which might be my problem. I am not very concerned about this since I am only interested in learning how to use the LibGDX library at this moment.

I am running 64-bit Ubuntu 18.04, and IntelliJ-IDEA 2018.3.3.

The Error:
Code: Select all
/usr/lib/jvm/jdk-11/bin/java -javaagent:/home/myName/idea-IU-183.5153.38/lib/idea_rt.jar=44783:/home/myName/idea-IU-183.5153.38/bin -Dfile.encoding=UTF-8 -classpath /home/myName/Desktop/My_Java_Projects/LibGDX_Projects/Tutorial/desktop/out/production/classes:/home/myName/Desktop/My_Java_Projects/LibGDX_Projects/Tutorial/core/out/production/classes:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-tools/1.9.9/55228989f0479dd4bbe487766eda15e5d512c51e/gdx-tools-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-backend-lwjgl/1.9.9/ca8911cb94c0bfeb59f99e46ca9b92440958fb0e/gdx-backend-lwjgl-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.9/7e644cfafdb436b13b24ac7993ffab17f306b64d/gdx-platform-1.9.9-natives-desktop.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-box2d-platform/1.9.9/72b2916f45f3f948896eda931cd597f7e698340f/gdx-box2d-platform-1.9.9-natives-desktop.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-box2d/1.9.9/e9a43c50fbe4f1e26dd0af5d2e78d125549e7f6b/gdx-box2d-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-backend-headless/1.9.9/657d1d232f274162eb8fd600a137b2221f2fc9c/gdx-backend-headless-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-freetype/1.9.9/d947872087863b654d9a0e27a8cb10a29d6fd3d6/gdx-freetype-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx/1.9.9/bf26f2f816b3cfe37ac6e66615391c30714b7030/gdx-1.9.9.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl_util/2.9.2/4b9e37300a87799856e0bd15ed81663cdb6b0947/lwjgl_util-2.9.2.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl/2.9.2/a9d80fe5935c7a9149f6584d9777cfd471f65489/lwjgl-2.9.2.jar:/home/myName/.gradle/caches/modules-2/files-2.1/com.badlogicgames.jlayer/jlayer/1.0.1-gdx/7cca83cec5c1b2f011362f4d85aabd71a73b049d/jlayer-1.0.1-gdx.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.jcraft/jorbis/0.0.17/8872d22b293e8f5d7d56ff92be966e6dc28ebdc6/jorbis-0.0.17.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.2/510c7d317f5e9e700b9cfaac5fd38bdebf0702e0/lwjgl-platform-2.9.2-natives-windows.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.2/d276cdf61fe2b516c7b7f4aa1b8dea91dbdc8d56/lwjgl-platform-2.9.2-natives-linux.jar:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl-platform/2.9.2/d55b46b40b40249d627a83a7f7f22649709d70c3/lwjgl-platform-2.9.2-natives-osx.jar:/home/myName/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput/2.0.5/39c7796b469a600f72380316f6b1f11db6c2c7c4/jinput-2.0.5.jar:/home/myName/.gradle/caches/modules-2/files-2.1/net.java.jutils/jutils/1.0.0/e12fe1fda814bd348c1579329c86943d2cd3c6a6/jutils-1.0.0.jar:/home/myName/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/7ff832a6eb9ab6a767f1ade2b548092d0fa64795/jinput-platform-2.0.5-natives-linux.jar:/home/myName/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/385ee093e01f587f30ee1c8a2ee7d408fd732e16/jinput-platform-2.0.5-natives-windows.jar:/home/myName/.gradle/caches/modules-2/files-2.1/net.java.jinput/jinput-platform/2.0.5/53f9c919f34d2ca9de8c51fc4e1e8282029a9232/jinput-platform-2.0.5-natives-osx.jar com.mygdx.game.desktop.DesktopLauncher
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.lwjgl.LWJGLUtil$3 (file:/home/myName/.gradle/caches/modules-2/files-2.1/org.lwjgl.lwjgl/lwjgl/2.9.2/a9d80fe5935c7a9149f6584d9777cfd471f65489/lwjgl-2.9.2.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.lwjgl.LWJGLUtil$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


run configuration
name: Desktop
main class: com.mygdx.game.desktop.DesktopLauncher
working directory: /home/myName/Desktop/My_Java_Projects/LibGDX_Projects/Tutorial/core/assets
use classpath of module: Tutorial.desktop.main
JRE: Default (11 - SDK of 'Tutorial.desktop.main' module)
shorten command line: user-local default: none - java [options] classname [args]

gradle-wrapper.properties
Code: Select all
#Fri Jun 09 23:06:52 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip


My Code:
Code: Select all
package com.mygdx.game;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class MyGdxGame extends ApplicationAdapter {
private SpriteBatch batch;
private BitmapFont font;

@Override
public void create() {
   batch = new SpriteBatch();
   font = new BitmapFont();
   font.setColor(Color.RED);
}

@Override
public void dispose() {
   batch.dispose();
   font.dispose();
}

@Override
public void render() {
   Gdx.gl.glClearColor(1, 1, 1, 1);
   Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

   batch.begin();
   font.draw(batch, "Hello World", 200, 200);
   batch.end();
}

@Override
public void resize(int width, int height) {
}

@Override
public void pause() {
}

@Override
public void resume() {
}
}
LuminousNutria
 
Posts: 3
Joined: Tue Dec 18, 2018 8:06 pm

Return to Libgdx

Who is online

Users browsing this forum: No registered users and 1 guest