Skip to content

/usr/bin/java: line 2: /usr/lib/jvm/default/bin/java: Too many levels of symbolic links - arch linux

So you just want to start a java application and it does not work.
First idea "lets start it from within a shell to see something", so you do.

/usr/bin/java: line 2: /usr/lib/jvm/default/bin/java: Too many levels of symbolic links
/usr/bin/java: line 2: exec: /usr/lib/jvm/default/bin/java: cannot execute: Too many levels of symbolic links

If something like above is your output, change into root mode and fix this issue.


sudo su
cd /usr/lib/jvm
ls -halt
# something like "default -> default" should be listed
rm -fr default
# if you have installed java-7-openjdk, what should be listed by the ls above
ln -s java-7-openjdk default

And thats it, enjoy your working java applications again.

Arch Linux PHPStorm (JetBrains) OpenJDK Update and No Font

I had updated my arch linux as usual and got an update for openJDK.

java -version
java version "1.7.0_60"
OpenJDK Runtime Environment (IcedTea 2.5.0) (Arch Linux build 7.u60_2.5.0-2-x86_64)
OpenJDK 64-Bit Server VM (build 24.60-b09, mixed mode)

After that, I started my phpstorm (I am working with the window manager i3wm and the screen looks strange. Everything was there, except for the fonts - I could not read anything (and I am not that cool to code without seeing the code :D-).
After log of tryouts, I found a simple and suitable solution.
sudo echo "-Dawt.useSystemAAFontSettings=gasp" > /usr/share/phpstorm/bin/phpstorm64.vmoptions

This has resolved the issue on my machine. There are some hints available, but I needed only one line, hope it suits your needs too.

howto - Apache Tomcat Configuration

All the needed configuration parameters you can/have to to are linked below. In this entry i want to point out the use of setenv.sh. With setenv.sh you don't have to edit the default startup script from the tomcat. This means you also can backup/store your settings on a well know place and then just create a link into the directory where your catalina.sh file is placed. The catalina.sh script itself looks for a setenv.sh and reads it. Everything that is configured inside the setenv.sh script overwrites the default settings inside the catalina.sh. links: tomcate.apache.org how to run a tomcat how to configurate a tomcate

netbeans - Cannot find java. Please use the --jdkhome switch.

I just want to start netbeans and what happens? Nothing. After trying it twice (via fbrun), i tried it a third time via cli/shell and there was the error "Cannot find java. Please use the --jdkhome switch.". Next stap was to ask the preferred search engine which leads to ... well nearly no good solution. So i searched a bit wild and after a time, my mind told me to look for two reasons.

The first look was to "where the hell is my current jvm installed?" which leads me to "/usr/bin/jvm/java-*". After that i located my current netbeans.conf and take a look into it.

In the "netbeans.conf" file, my eyes founded a missconfigured line where the "netbeans_home" pointed to a non existing path. Quickly adapted it and "et voila", everything is working again.

Hint: With this configuration, you can easily switch your current used jvm!