# Can't locate libjava.so

**URL:** <http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728>\
**Category:** ELAN\
**Created:** [15 April 2020 15:44 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728 "2020-04-15T15:44:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [15 April 2020 15:44 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/1 "2020-04-15T15:44:35Z")

</div>

OS is Arch Linux (also Manjaro), all is up to date.  
Downloaded and untarred 5.9 binary, receive the following error when invoking:  
ELAN\_5-9]$ ./ELAN  
Error: could not find libjava.so  
Error: Could not find Java SE Runtime Environment.  
However:  
ELAN\_5-9]$ locate libjava.so  
/home/kiesling/bin/ELAN\_5-9/runtime/lib/libjava.so  
/usr/lib/jvm/java-13-openjdk/lib/libjava.so  
/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libjava.so

IOW it exists both in the ELAN directory and in the system. So it seems ELAN is not finding the file. Is there a config file to edit to point it to the right location? Note that the first instance of libjava.so is in the ELAN file from the downloaded/untarred directory!  
Thanks  
Scott

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [16 April 2020 10:38 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/2 "2020-04-16T10:38:45Z")

</div>

The only config file you could try is in ELAN\_5-9/app and is named ELAN.cfg.  
In that file there is a line  
app.runtime=$APPDIR/runtime

Maybe replacing that with the full or absolute path to the ELAN\_5-9/runtime folder (or that of a different jdk) will help? I don’t know, in principle that should not be necessary.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [21 April 2020 17:30 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/3 "2020-04-21T17:30:53Z")

</div>

I changed to an absolute path but I got the same error. Any way to debug when this happens?

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [22 April 2020 12:20 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/4 "2020-04-22T12:20:38Z")

</div>

I don’t know if this helps, but what you could do is (when in the ELAN folder) invoke  
runtime/bin/java --help  
and if all is well help messages will be printed. You could try some of the debug-like arguments. Add, e.g., the option -verbose to the section [JVMOptions] in the ELAN.cfg file and run ./ELAN again.  
I don’t know what to expect, maybe “java --help” already throws the same error you had before.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [23 April 2020 17:37 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/5 "2020-04-23T17:37:30Z")

</div>

Really appreciate the help. Unfortunately, none of those strategies has helped. What linux distributions are documented as this working with? Ubuntu? If I know what the java differences are between distros I might be able to figure it out…

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [23 April 2020 19:04 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/6 "2020-04-23T19:04:47Z")

</div>

Yes, the distributions have been created and tested on Ubuntu. We don’t have the resources to test on any of the many other distributions.

Can I ask in what way the suggested strategies failed? Same error when invoking e.g. “java -version”?  
As an alternative you could download the source distribution and build and run ELAN from there. It requires Maven installed and configured.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [6 May 2020 17:03 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/7 "2020-05-06T17:03:18Z")

</div>

I’m back at this after a delay. I’m happy to work to get this going, knowing that it works on Ubuntu might help discover the problem. When I used -verbose (tried all options) in the [JVMOptions] section I got the same error.  
I actually did try to build from source but got an error there too – IIRC, it had to do with not being able to download something. I will try again.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [6 May 2020 20:07 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/8 "2020-05-06T20:07:15Z")

</div>

Here’s the build failure:

```
[ERROR] Failed to execute goal on project elan: Could not resolve dependencies for project nl.mpi:elan:jar:5.9: Failed to collect dependencies at javax.graphics:jlfgr:jar:1.0: Failed to read artifact descriptor for javax.graphics:jlfgr:jar:1.0: Could not transfer artifact javax.graphics:jlfgr:pom:1.0 from/to MPI (https://lux15.mpi.nl/nexus/content/groups/public/): Transfer failed for https://lux15.mpi.nl/nexus/content/groups/public/javax/graphics/jlfgr/1.0/jlfgr-1.0.pom: Connect to lux15.mpi.nl:443 [lux15.mpi.nl/192.87.79.61] failed: Connection timed out (Connection timed out) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVE/DependencyResolutionException

```

Suggestions most welcome.  
I will look into differences in Ubuntu and Arch meanwhile.  
Thanks-

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [7 May 2020 07:14 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/9 "2020-05-07T07:14:39Z")

</div>

There seems to be a problem with that server. I’ll contact system administration and will let you know when the server is up again. I’m sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [13 May 2020 08:16 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/10 "2020-05-13T08:16:08Z")

</div>

With apologies for the delay, but the server is online again. Some maintenance was carried out, which made some services inaccessible externally. These services will be removed or relocated at some point in the future; we’ll try to update the source distribution and the build script accordingly by that time.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [13 May 2020 15:55 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/11 "2020-05-13T15:55:27Z")

</div>

Thanks, things went faster this time. Unfortunately, the result was not good, but perhaps provides info \>

> [ERROR] Faile d to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project elan: Compilation failure  
> [ERROR] javac: invalid target release: 9  
> [ERROR] Usage: javac   
> [ERROR] use -help for a list of possible options  
> [ERROR]  
> [ERROR]  
> [ERROR] → [Help 1]  
> [ERROR]  
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
> [ERROR]  
> [ERROR] For more information about the errors and possible solutions, please read the following articles:  
> [ERROR] [Help 1] [MojoFailureException - Apache Maven - Apache Software Foundation](http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException)  
> ==\> ERROR: A failure occurred in build().

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [14 May 2020 08:40 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/12 "2020-05-14T08:40:38Z")

</div>

Hmm, I’ve seen that message, “javac: invalid target release: 9”, but what was the issue then?  
If you run “mvn -version” does the output mention the Java version you expect (\> 10)? Maybe Maven is pointing to an older Java version?

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [14 May 2020 17:08 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/13 "2020-05-14T17:08:57Z")

</div>

Almost there I think.  
I did “mvn install.” Along the way it starts up ELAN, so clearly it can work. I exited and it finished with a build success message. Now, how do I actually start ELAN after building?  
Thanks for all your help!

---

<div class="post-metadata">

**Author:** ![hasloe](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hasloe](http://archive.mpi.nl/forums/u/hasloe)\
**Post date:** [14 May 2020 17:34 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/14 "2020-05-14T17:34:39Z")

</div>

If it has been built already, “mvn test” should launch ELAN.  
“mvn package” builds the sources, if needed, launches ELAN and also creates a “package”, a jar file with all compiled classes.

---

<div class="post-metadata">

**Author:** ![sfabius](http://archive.mpi.nl/forums/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sfabius](http://archive.mpi.nl/forums/u/sfabius)\
**Post date:** [14 May 2020 17:49 UTC](http://archive.mpi.nl/forums/t/cant-locate-libjava-so/2728/15 "2020-05-14T17:49:30Z")

</div>

Great thanks! 😀
