In Ubuntu java -version gives Error occurred during initialization of VM - java

I have Ubuntu 64 bit 13.10 I have manually install java 8 in my machine
But When i do
java -version
it gives me
orbit#parth-desktop:~$ java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
Need help on this. I have installed java in /usr/lib/jvm folder

According to Rigg802 in this post, you most likely installed the jvm without proper permissions. If you look at that link, he reccomends uninstalling and reinstalling with proper permissions (ie sudo), and if that doesn't work he has some more solutions as well.

Related

I installed kotlin from github but it is not working in cmd

I downloaded the kotlin compiler from its github site (version 1.3.72) and i have java jdk version 13.0.2. I have put both in the path in environment variables in my pc but its still giving me an error. The java jdk is working fine and i can run java programs fine but the kotlin commands are not recognized by cmd. when i type kotlinc -version in cmd, i get:
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Error: Could not find or load main class org.jetbrains.kotlin.preloading.Preloader
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.preloading.Preloader
I have Windows 10 (64 bit). I am trying to install kotlin so that I can run it in VS code. But if the kotlinc command is not being recognized then I cant do anything futher.
In my path variable, I put:
D:\Setups and Installers\Kotlin 1.3.72\kotlinc\bin
which is where I installed the kotlin compiler from github.
The Kotlin github can give you some pointer.
In the prerequisiste it said you need java 1.8 and JDK 9 installed
But you Have the JDK 13
Which can explain the issue

"Unrecognized option: --add-opens" Hyperledger Besu

I want to get started with Hyperledger Besu, after following the steps of the official documentation here and running the following command:
bin\besu --help
I get the following error:
C:\Users\user\Desktop\besu-1.3.9>bin\besu --help
Unrecognized option: --add-opens
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I get the same thing when running bin\besu or bin\besu -help.
I don't know if the problem is with java's installation or with hyperledger besu trying to run unvalid/unrecognised option bin\besu --add-opens. I tried uninstalling then reinstalling java but this did not solve the issue, here is java's version:
C:\Users\user>java -version
Picked up _JAVA_OPTIONS: -Xmx512m
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) Client VM (build 25.241-b07, mixed mode)
Any help would be appreciated!
I have no prior experience with the library which is in discussion, but I have just had a look at the official docs of the library which you are trying to use, and the installation instructions state that you require Java 11+ to complie
Hyperledger Besu requires:
MacOS High Sierra 10.13 or later versions
Java 11+ to compile; earlier versions are not supported.
From your question, it looks like your system is running Java8. Trying bumping it up to java 11 and try starting the binary again.
The script you're running adds --add-opens java.base/sun.security.provider=ALL-UNNAMED to the java command line that starts Besu. As others have noted, the --add-opens parameter was made available in Java 9; all it does is prevent a warning from being issued when any class uses reflection to access an internal JDK class (in this case, the Sun security package). I've been starting Besu without this parameter for weeks with no problems, so you could have simply removed the parameter from the Besu start script or -- better -- upgraded to at least the Java 11 or higher version that Besu expects. According to Oracle, this command line parameter will be removed eventually, but that's a problem for the Besu maintainers, not you.
change the java home version path from jdk8 path to jdk11 in environment variable
as
JAVA_HOME : {jdk11 directory path}

Flex mxmlc error loading JVM windows 7 64 bit

I'am executing this command in my windows 7 console:
mxmlc
then I get:
Error loading: C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
How to fix this?
the jvm.dll exists in that directory, but why the error occurs?, I've tried to reinstall java, but it didn't helped
The flash compiler, mxmlc, does not run under a 64 bit jvm. According to the 4.6 SDK docs:
Note: You must use a 32-bit version of the JDK, version 1.5 or later. The command line compilers do not work with a 64-bit JDK.
Unfortunately, You will need to install a 32 bit jvm.

Installing 32-bit Java on 64-bit CENTOS: error java/lang/Object

I have a CENTOS box
* release 6.5 final
* Kernel Linux 2.6.32-431.el6.x86_64
* GNOME 2.28.2
* Processor Intel Xeon
* 64-bit
The 64-bit version of Java came included with the installation, as did Firefox.
I want to run a 32-bit Java application that I wrote, tested on Windows, on my CENTOS box, but am running into a problem.
I went to the java download page and downloaded the 32-bit RPM version of Java, jre-7u45-linux-i586.rpm. I installed the package by opening up a terminal window, doing a su and entering the root password, and installed the RPM package. The installation went without a hitch.
I tried executing "java -version" from a terminal window (regular user or su makes no difference) and received some sort of elf error, which led me to a stack overflow issue that said to execute from a su'ed terminal window "yum install glibc.i686". I did that, but am now running into:
Error Message
[root#sarah-linux Downloads]# /usr/java/jre1.7.0_45/bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
PATH
/usr/java/default/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jmr/bin
CLASSPATH and JAVA_HOME
not defined
I also tried setting these two environment variables to
/usr/java/jre1.7.0_45/bin
but no dice, same problem.
Thoughts?
Back out the RPM install of the 32 bit Java. You don't need it. You can run 32 bit compiled byte code in a 64bit JVM. Just can not do it the other way around.
You need to set your jre class path.

Issues installing Matlab R2013a on OpenSuse 12.3 (x64)

I am a fairly new linux user and I therefore have no idea where the error might come from. As I was trying to install Matlab (R2013a) on opensuse I had the following error:
/tmp/mathworks_2336/sys/java/jre/glnxa64/jre/bin/java -Xmx512m -splash:"/home/desertfox/iso/java/splash.png" -Djava.ext.dirs=/tmp/mathworks_2336/sys/java/jre/glnxa64/jre/lib/ext:/tmp/mathworks_2336/java/jar:/tmp/mathworks_2336/java/jar/ja_JP/:/tmp/mathworks_2336/java/jar/zh_CN/:/tmp/mathworks_2336/java/jarext:/tmp/mathworks_2336/java/jarext/axis2/:/tmp/mathworks_2336/java/jarext/guice/:/tmp/mathworks_2336/java/jarext/webservices/ com/mathworks/professionalinstaller/Launcher -root "/home/desertfox/iso" -tmpdir "/tmp/mathworks_2336"
Installing ...
dl failure on line 685Error: failed /tmp/mathworks_2336/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so, because /tmp/mathworks_2336/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so: invalid ELF header
Finished
I have previously mounted the .iso file and launched the following command in the mounted folder: ./install -v, with no sucess as you can see above.
What could be the error? Java?
I have checked my java version which I believe is up to date.
linux-a6xj:/home/desertfox/iso # java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Any Suggestion?
Thank you in advance for any help.
PS: I looked at almost all the posts and I did try the chmod+x sys/java/jre.. as mentionned here
MATLAB on Linux may still not yet be compliant with Java 7. Uninstall JDK 7 and try again. Install openjdk-6-jre if it still doesn't work, but it should work on its own.

Categories

Resources