Could not create the Java virtual machine OSX10.9 - java

Can't seem to find an answer to this.
If I type java -version I get
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
I'm trying to run PMD to analyse an iOS project. When I run the command in Terminal however, I get:
Could not create the Java virtual machine.
Anyone have any idea what is causing this?

This could be due to installation issue. Check whether you have installed correct JRE for your platform(bit pattern etc.). If its fine try changing memory settings.
This link will help you to set memory settings in Java

Related

Unable to locate a Java Runtime that supports javac

I am attempting to compile a "Hello World" program in Java 8 update 333. When I attempt to compile it, this happens:
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.
Please visit http://www.java.com for information on installing Java.
java -version:
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)
You probably installed a JRE (Java Runtime Environment) rather than a JDK (Java Development Kit). You need a JDK to be able to compile.
(Thanks go to RealSkeptic for the answer - see above.)

How to run evosuite with(out?) jdk

I get this error when i run EvoSuite
java.lang.RuntimeException: No Java compiler is available. Are you running with
the JDK?
A bit confusing, is it asking me to run with the JDK, or is it stating that i shouldn't?
When i run java -version it gives
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
You need to have JDK installed in your machine (and not just the JRE). This is because EvoSuite needs to compile and verify the tests it generates. If you have the JDK, but EvoSuite still does not find it, try to configure the JAVA_HOME system variable to point to it

What's the cause of java.lang.UnsatisfiedLinkError in my situation

I build a dll with Visual Studio 2008 and it's called by java side throuth jni.
It works fine in A machine but failed in B machine.
The error info is like:
java.lang.UnsatisfiedLinkError:xxx.dll Can't find dependent libraries
The configuration info is like below (The OS and jdk is the same):
A machine:
Win7 64bit;
java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
eclipse-standard-kepler-SR2-win32-x86_64
B machine:
Win7 64bit;
java version "1.7.0_65" Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
eclipse-java-luna-SR1a-win32
The code generation of dll is Multi-threaded Debug (/MTd).
I have no idea about the cause so that please let me know if you need more information to judge the cause.
Thanks for your help in advance.
To find the missed dependency use the Dependency Walker. Open your DDL and it will show you all DDLs it depends on. It will show you also which one could not be found on the current systen.
http://www.dependencywalker.com/
The java.lang.UnsatisfiedLinkError:xxx.dll Can't find dependent libraries is throwed in B machine but not in A machine is because that dll's dependent libraries can't be found by the dll in B machine and to fix it, you can add dependent libraries' path to the environment path. To get the dependent libraries, follow #SubOptimal's suggestion.

JWplayer suddenly not working - says Java not installed, but it IS (playback issue)

I was using openjdk 7, then all of a sudden I wasn't able to stream a video with JWplayer. I tried setting $PATH in Ubuntu 14.04 among lots of other things until I just gave up and purged openjdk completely. I installed Oracle 8, and I still get the same issue.
$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
The videos just say that Java is not installed, to install it and restart my browser, etc.
This is extremely frustrating. Any ideas?
JW Player does not make any use of Java at all. It is a script written in Javascript, which is simply part of your browser.

maven2 on ubuntu java home is not defined correctly

I have problem to use maven from ubuntu server 13.10 64bit.
I am getting following error (even when I type mvn -version):
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/jdk//bin/java
But when I type java -version I get:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
I have no idea where can be the problem, especially because I have used maven without any problems before I've installed hadoop 2.2.
Thank you in advance for any help.
It appears that the Hadoop instructions and/or start up script modifies the JAVA_HOME environment variable in the shell.
Unless this change is made permanent by changing one of the many configuration files - like $HOME/.profile - it only influences the shell in which you have observed the problem.

Categories

Resources