Skip to content

Tag: compiler-errors

How to compile OpenJDK with OpenJ9 on Linux without a NUMA error?

Hello Stackoverflowers! I am trying to build the OpenJDK with OpenJ9 on Linux, but when I run the configure script, I get the error: Normally it should have just created the config and let me build, because I don’t have multiple CPUs. I have already googled the error message and looked trough and followed the documentation on the projects Github(https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/doc/building.md

Two java files. Getting IllegalAccessError when running class with main method trying to access a method from the other file

Learning Java. I have two files, each containing one java class. When I run the file with the main method, I get the following error: Exception in thread “main” java.lang.IllegalAccessError: failed to access class TapeDeck from class TapeDeckTestDrive (TapeDeck is in unnamed module of loader ‘app’; TapeDeckTestDrive is in unnamed module of loader com.sun.tools.javac.launcher.Main$MemoryClassLoader @18bf3d14) at TapeDeckTestDrive.main(TapeDeckTestDrive.java:3) Any help please?

Cannot make a static reference to the non-static method

Building a multi-language application in Java. Getting an error when inserting String value from R.string resource XML file: This is the error message: Error: Cannot make a static reference to the non-static method getText(int) from the type Context How is this caused and how can I solve it? Answer Since getText() is non-static you cannot call it from a static