jgit errors on new instal [message #1819305] |
Sun, 12 January 2020 22:47  |
Eclipse User |
|
|
|
I'm getting lots of errors on jgit like the following:
The method ByteBuffer.flip() referenced in org.eclipse.jgit.internal.storage.reftable.BlockReader.readBlockIntoBuf(BlockSource, long, int) is not defined in the bundle's required execution environment: JavaSE-1.8
This is after a new install on Ubuntu 19.04. I could not find any install instructions for eclipse. I choose the git option because I knew I would want it later.
At this point I can't even compile a simple "hello world" program.
Ultimately I'm just trying to make a simple mail test program to figure out why an application that uses javax.mail won't connect to my mail server. It just throws a rather unhelpful exception saying it failed.
Thanks, Andy
|
|
|
Re: jgit errors on new instal [message #1819306 is a reply to message #1819305] |
Mon, 13 January 2020 00:05   |
|
Sounds like you might not be targeting an actual Java 8 runtime and are seeing references to methods that don't exist there. Install one (such as from adoptopenjdk.net) and make sure your workspace knows about it.
And what was the unhelpful exception?
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Re: jgit errors on new instal [message #1819309 is a reply to message #1819306] |
Mon, 13 January 2020 04:10   |
Eclipse User |
|
|
|
I grabbed OpenJDK8U-jre_x64_linux_hotspot_8u232b09.tar.gz and untarred it under /var/lib/jvm, just as the version 11 was. I can't find any place in Eclipse where you set the version of java.
The exception is:
Trying to send mail but exception occured: Sending the email to the following server failed:
It tells me it failed, but that is it. The application is using apache.commons.email, which itself uses javax.mail. I don't know java very well, but didn't think it would take me days to get a simple test program running. Its astounding how convoluted it is.
I tried using Eclipse because jdb won't run. It can't connect to my machine. If I try to force it to use localhost using
-Xrunjdwp:transport=dt_socket,address=127.0.0.1:50547
That just give me a new error:
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
Error occurred during initialization of VM
agent library failed to init: jdwp
I spent hours googling that one, running strace to figure out where jdb gets its defaults from. No such luck. The jdb man page didn't help. Finally, I read that debugger under eclipse is better. I decided to give that a try. That is how I arrived here :)
Thanks
|
|
|
Re: jgit errors on new instal [message #1819362 is a reply to message #1819309] |
Tue, 14 January 2020 01:40  |
|
> I can't find any place in Eclipse where you set the version of java.
You would do so first from the Installed JREs preference page, and then make sure the project's JRE is set for Java 8, either by the name you gave it on that preference page or by the correct Execution Environment.
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.09287 seconds