wenn ich ein HalloWelt compilieren möchte kommt folgender Fehler:
gast@gast-netbook:~/Downloads$ javac HalloWelt.java
Error initialising natives: couldn't open libjava.so: use -verbose:jni for more information
Error initialising VM (initialiseNatives)
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
publicclassHalloWelt{publicstaticvoid main (String[] args){System.out.println ("Hallo Welt!");}}
gast@gast-netbook:~/Downloads$ java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.2)
JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching)
gast@gast-netbook:~/Downloads$ javac -version
Error initialising natives: couldn't open libjava.so: use -verbose:jni for more information
Error initialising VM (initialiseNatives)
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Ich habe jetzt java mit apt-get remove openjdk-7-jdk openjdk-7-source openjdk-7-demo openjdk-7-doc openjdk-7-jre-headless openjdk-7-jre-lib deinstalliert und darauf mit apt-get install openjdk-7-jdk openjdk-7-source openjdk-7-demo openjdk-7-doc openjdk-7-jre-headless openjdk-7-jre-lib wieder installiert.
Das führt zu folgenden Ausgaben:
gast@gast-netbook:~$ java -version
The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install <selected package>
gast@gast-netbook:~$ javac -version
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
Eine Installation funzt aber auch nicht, habe ich ja grad auch schon gemacht:
gast@gast-netbook:~$ sudo apt-get install openjdk-7-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-7-jdk is already the newest version.
The following package was automatically installed and is no longer required:
bogl-bterm
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 264 not upgraded.
Vermutlich bin ich an meinen schlechten Linuxkenntnissen gescheitert...