So I wanted to restart my project, and deleted all the files I created that were related to this project (using jGrasp for Java). But then when I restarted my project and compiled the file I received the following error.
error: module not found: javafx.controls
1 error
Then I tried it on the old file that I was sure would work, but I got the same error. I was wondering how to fix it (I feel I might have deleted a file that I was not supposed to).
I'm guessing you upgraded Java. JavaFX was removed in Java 11. See https://jgrasp.org/javafx.html for instructions on downloading JavaFX separately and configuring jGRASP to use it.
Related
I've set the correct launch options in the .json file to my knowledge. I've imported the .jar files of java fx to the referenced libraries folder in VS Code but don't understand why I'm receiving this error. I have imported javafx.controls to the reference library, but still get this error.
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
My code is fine with no yellow or red underlines and should compile and run but it is not.
There's no JavaFX and VS Code from its official tutorial, but for all IDEs in Windows, the VM options is like
You may follow this answer to check if there's any environment configuration missed to cause this error.
I just added lwjgl 3.1 to a project in Intellij IDEA. To verify everything was done correctly I tried to run the guide code in the webpage (https://www.lwjgl.org/guide), but when compiling the following error came out:
"Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.lwjgl.system.MemoryAccess"
After a google search I found out that the possible error is in the configuration of the native libraries, which I have added when configuring the library in the project.
When LWJGL was downloaded from the webpage, I got a a zip file with all the jar files of the modules (classes, docs, natives and sources), what I did was to separate them accordingly and then add them as a single library in the global libraries section of the IDE.
Global Libraries
After this, the library appears as a module of the project.
Still, the program won't compile. Is there anything else I should configure?
You claim that this is a compile-time error, however, after looking through the documentation, I have found out that this is a runtime error, where you successfully compile, but the JVM is unable to find the class at runtime. To solve this, I would suggest merging your .jar output and the lwjgl jar using jarsplice to see if that fixes it. If it fixes it, the problem is with intelliJ not correctly adding your libraries to your jar.
I am trying to compile and run the project
https://github.com/jitsi/jitsi-android on Eclipse by Importing.
I have imported the project successfully,Added External Jar files and Fix some of compilation errors.
When I try to run app, It is giving
Conversion to Dalvik format failed with error 1 Error on the console.So that I Clean the project, checked the all the jar files from Order and Export tab and build it again.
but it doesn't work for me.
Finally, I unchecked the all the libraries from Order and Export tab,build and run it again.
But still its giving me same error and my application is getting crashed every time i run it.
Any help will be appreciated , i really want to run this application.
here is my libs folder screenshot:-
I've had the same problem once.
Here is what I found out when I was trying to solve my issue:
The error is caused when there are two Classes/Packages with the same name (For example when LibaryX has Class org.a.b.c.Sample and LibaryY has class org.a.b.c.Sample aswell)
Different approaches which worked for some people (So if you have the error yourself, make sure to test following things out):
A) Two Libaries have the exactly same package/class-> Delete the class in one of the Libaries
B) One Jar is detected twice because it's for example in the project source folder and in the Java Build Path Libaries aswell
C) Updating Proguard often fixes it aswell (Put the new Proguard jars in [Android SDK folder]\tools\proguard\lib)
D) Cleaning the Project also helped many people (you already did that, so that won't be your solution)
When I had this issue myself it was caused because I did not follow the instructions of one of the libaries that I used. After following the libary instructions step by step, everything worked fine again.
Greetings
Felix
I am writing an android application using eclipse and am trying to use jar files I generated from another eclipse (not android) project I wrote. However, when I try to run my android application, I get the following error message:
[2014-05-15 18:42:25 - ResearchNotebook] Dx 1 error; aborting
[2014-05-15 18:42:25 - ResearchNotebook] Conversion to Dalvik format failed with error 1
which is preceeded by a longer error message.
I looked at the following question (Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library), and but am not sure how I would reconfigure the eclipse IDE so that rt.jar and android.jar are not being passed to dx.
However, I wrote non android java code within the same project using the jar and ran it in the console. It worked perfectly fine. The problem only arises when I try to use the jar for the classes pertaining to the android application.
At this point, I have tried many different alternatives, including cleaning the project, deleting the jars from the buildpath and adding them again, and changing order and export according to the following site: http://tools.android.com/recent/dealingwithdependenciesinandroidprojects.
Is there something else I should have done when generating the jar from my eclipse (non android) project? I have really hit a wall this problem and am at a loss about how to proceed.
Try the following:
Uncheck "Build Automatically" from the "Project" menu.
Do a project cleanup.
Export your project
Hope it helps.
I am struggling hard to compile a GWT project. I confirmed that GWT, AppEngine and necessary library are referenced to the project (added in the Java Build Path, also GWT is installed successfully from Marketplace).
Using the setting above, I tried to build using GWT and I have been getting
java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler
over and over again.
Then tried to set gwt-dev.jar in Windows CLASSPATH, and I could get off from this error but ended up with
[ERROR] Unable to find 'some/package/My_Project.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
I tried to set project classpath to some/package/ but didn't work.
Even I could manage to get over with this error for once, again I got into another error:
java.lang.NoClassDefFoundError: com/google/appengine/tools/enhancer/Enhance.
I screwed up the environment and couldn't get to the last error I was getting, and I was just stuck on the second error.
I have tried removing all Run Configuration, creating new workspace and import projects from scratch and tried everything that I found on Google.
Did you look at this answer: GWT/ Eclipse: ClassNotFoundException com/google/gwt/dev/Compiler
Also, you can try to clean your project and add the jar file via the usual class path configuration within eclipse (right click on your project). You can then add the gwt-dev.jar file from the plugin. Make sure you use the one that was installed in the plugin for eclipse.
[ERROR] Unable to find 'some/package/My_Project.gwt.xml' on your
classpath; could be a typo, or maybe you forgot to include a classpath
entry for source?
Check out the link for more info...Here