Java failed to bootstrap path, eclipse, jdk-13 - eclipse

I’m trying to update my JavaFX project to be compatible with JRE 13 (until now it was set up to use JRE 1.8). I’m developing with Eclipse 2020-03, using a Mac.
The first big issue I’ve had to deal with is the migration from the included JavaFX libraries in JDK 1.8 to having to import JavaFX (14) as an external package for JDK 13.
The second issue is migration from using the classpath to using the modulepath. I’m new to the module path, so what I say about it may not make sense, but my current setup now is this:
modulepath:
<list of other .jar files>
JRE System Library [Java SE 13 [13.0.2]]
JavaFX 14
<list of .jar files I downloaded, including javafx-swt, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, javafx.web>
<I created a User Library from the above listed .jar’s>
Finally, all the compiler errors are now gone (I had to recompile some of the external .jar files I downloaded so there weren’t any split packages), but when I build and run the application class nothing happens.
Checking the Mac system console, the below output seems to reference why the app is not starting, but I checked he JDK path and the referenced java executable does exist.
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.java.40558): Failed to bootstrap path: path = /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java, error = 2: No such file or directory
What is happening here? If you need more info about my project config, comment and I can add details.

Related

export with jdk 8 still got error when start server

I used eclipse with jdk 8 to export to jar. Yet i still get this error when start my server sfs
Exception in thread "main" java.lang.UnsupportedClassVersionError: sfs2x/extension/mmo/MMORoomDemoExtension$NPCData has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Could someone tell me how to fix.
I tried to uninstalled all java and install jdk8 only. But nothing change.
I had a similar problem, what fixed it for me was making sure that jdk8 was selected as the build jdk for that project (right click on your project in Eclipse and click on properties -> Java build path -> JRE System Libraries -> Workspace Default JRE, make ure that jdk8 is selected) and then recompiling. I was able to delete all .class files before recompiling as well, but that may be difficult if this is a project.
Best of luck.

The package org.openqa.selenium is accessible from more than one module

I'm using:
Firefox 56.0.1
Selenium 3.6.0
Windows 10 home edition
Gecko Driver 0.19.0
The error message is
The package org.openqa.selenium is accessible from more than one
module: client.combined, net.bytebuddy"
This happens when you have added the external jars in the ModulePath.
Solution:
Remove the external jars from the node "Modulepath".
Select the node "Classpath" then add the external jars.
Review that all the jars are under the node "Classpath".
The problem is that you are adding .jar files to your Modulepath instead of Classpath.
Go to
Project → BuildPath → Config BuildPath
click Remove Jars from Modulepath
then click on classpath → Add external selenium jar files
Add all the required jar files inside classpath instead of module path. The same issue was also occurred with me but after adding the jars to classpath it got resolved.
I don't know anything about Selenium, but it looks like you have two modules that contain the exact same package name inside of them:
client.combined
net.bytebuddy
So when you say e.g. import org.openqa.selenium.WebDriver Eclipse doesn't know if you want to use that package from client.combined or from net.bytebuddy.
You need to either add a prefix in that import statement that will specify whether you're importing package org.openqa.selenium from client.combined or from net.bytebuddy.
You can possibly do this by just doing:
import client.combined.org.openqa.selenium.WebDriver
import client.combined.org.openqa.selenium.firefox.FirefoxDriver
or
import net.bytebuddy.org.openqa.selenium.WebDriver
import net.bytebuddy.org.openqa.selenium.firefox.FirefoxDriver
You can also try removing either of the packages (client.combined or net.bytebuddy) from your project
Add required JAR in class path instead of module path. Also delete unnecessary JARs which might have reference to the mentioned package.
I had the same error and removing the reference to one of the jar files solved the issue.
Remove the reference to one of the jar files that you added in java build path.
From the screen shot that you added I see you have reference to both
client-combined-3.6.0-sources.jar
and
client-combined-3.7.0.jar
both the packages have the same classes implemented.
Remove the reference to one and see if that help.
I had the same issue. I used JDK 9 and eclipse oxygen 64-bit version (Selenium 3.9.1). My first thought, it is the JDK 9, but I tested on IntelliJ IDEA JDK 9 and worked without any problem. So I installed the eclipse oxygen 32-bit version with JDK 8 (-no JDK 9 version on 32 bit) and the problem disappeared.
this happens when same java package code (package name + class name) is available in more than one jar file; for default modules every jar is exposed as Module. Modules essentially can not have same package name exported. This is more of a code cleanup task.

Setting up LWJGL 3.0 with Netbeans

Downloaded LWJGL 3.0 from lwjgl.org, which only had the lwjgl.jar file in the jar subdirectory. The native directory only has files like libglfw.so but no subdirectories at all (and certainly not native/windows).
Created a library LWJGL30 with the lwjgl.jar file.
Added it to my project's library. and to the Project Properties->Libraries->Compile and Run.
Set the JVM launch argument in Project Properties->Run to -Djava.library.path=C:\Users\Owner\Documents\lwjgl\native for the VM Options
Copied the HelloWorld example from the link
Then ran and I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.lwjgl.system.Library at
org.lwjgl.system.MemoryAccess.(MemoryAccess.java:22) at
org.lwjgl.system.Pointer.(Pointer.java:22) at
org.lwjgl.glfw.GLFW.(GLFW.java:594) at
mylwjgl.MyLWJGL.run(MyLWJGL.java:43) at
mylwjgl.MyLWJGL.main(MyLWJGL.java:140)
C:\Users\Owner\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53:
Java returned: 1 BUILD FAILED (total time: 7 seconds)
I have checked, double checked, triple checked as well as searching online for an answer as it should work but it does not. Any help would be appreciated.
This error occurs when LWJGL is unable to find the native files. Make sure java.library.path actually points to the directory with LWJGL's natives (which have extensions like .dll, .so and .dylib). Be careful with spaces in the path: You have to wrap the path in quotation marks or it won't work.
The issue was I was running the HelloWorld example using the Stable version of LWJGL 3.0. When I switched to the Latest version, everything worked as expected.

Android SDK tools rev 19: Issue with external jar files

I know this question was asked a couple of times on stackoverflow - but I still face some problems trying to add an additional jar file to an existing android project - using android sdk tools rev. 19.
Summary:
I use eclipse Version: 3.6.2
The project compiled and the artefacts worked with android sdk tools rev. 14/any android >2.2 (>= API 8)
The project does compile with sdk tools rev. 19/any android >2.2 BUT the artifacts do not contain the jars defined within the classpath - so I keep getting java.lang.NoClassDefFoundError exceptions
I tried to add "jar.libs.dir=lib" to my project.properties - since lib contains all the jars without any positive effect.
I also tried to create a new dummy project adding jars as I always did (all jars added to a lib folder within the project, right click on the jar > add to build path)
I tried to add the jars using import
Thank you for your help.
Rename your "lib" folder to "libs".

Eclipse doesn't show java source code

I'm running java 1.6 in Eclipse on my Intel Mac. I'm using the 1.6.0 version under System/Library/Frameworks and set the default compiler to this in Eclipse.
How do I attach the source code?
First, I downloaded the 1.6 source from oracle, thinking I could attach that 'cause the installed 1.6 didn't have source.
When I click a java class to get the Source Code Editor, there are problems:
first, the top line says Compiled from File.java (version 1.5 : 49.0, super bit)
most important, when I attach the 1.6 source jar file, it gets an error:
An error has occurred. See error log for more details.
Unable to create resource org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor#50417ba8
This also appears in the error log:
java.lang.ClassNotFoundException: org.eclipse.ui.internal.views.log.LogView
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
The Eclipse version is: Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911
When I click for installation details, I get:
An internal error occurred during: "Fetching children of _SELF_".
Registry Directory not available: /Users/rfrail/Downloads/eclipse 2/p2/org.eclipse.equinox.p2.engine/profileRegistry.
I'm running Eclipse from my Download directory (it's worked fine in the past); however, there are 2 folders for Eclipse:
eclipse, and
eclipse 2.
So that looks like a source of confusion right there. Eclipse operates fine otherwise.
Can you help, please?
http://java.decompiler.free.fr/ is your answer
it has an eclipse plugin which decompiles code in place