While attempting to start Matlab R2013b in Ubuntu, I get the following dialog box with an error message and Matlab crashes and closes.
Can someone explain the error and how to rectify it?
This is a known JDK bug. It is addressed in this question pretty thoroughly from the java perspective.
When it comes to Matlab, you options seem to be (apart from upgrading Matlab and/or OS):
Add the following JVM startup option through java.opts file:
-Djava.util.Arrays.useLegacyMergeSort=true
Use a different java version by setting MATLAB_JAVA environmental variable. It may result in all sorts of side-effects, depending on which Matlab / Java combination you end up using.
I received an error when trying to run HP's Operations Orchestration Studio for the first time.
The error in question states "Java Virtual Machine Launcher, a java exception has occurred". Having raised a ticket with HP, they suggest this is a java problem rather than a problem with OO studio.
I have seen similar errors to this with Eclipse posted in forums and the solution being to delete the .metadata folder, unfortunately OO doesn't appear to have such a file.
I have also tried removing all versions of Java installed on my Windows 7 64-bit machine and tried installing different 64-bit and 32-bit versions of Java which no success.
Does anyone know a way I could debug this error in order to resolve it?
Any help is much appreciated.
I just installed Android Studio on Elementary OS 0.3 Freya and run it using the terminal. On my first start-up, however, there's an error message shown:
Gradle 'Test' project refresh failed
Unable to start the daemon process. This problem might be caused by
incorrect configuration of the daemon. For example, an unrecognized
jvm option is used. Please refer to the user guide chapter on the
daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
Unrecognized VM option 'MaxPermSize=256m' Error: Could not create the
Java Virtual Machine. Error: A fatal exception has occurred. Program
will exit.
I read this and tried all the ways to solve it but to no avail. I did notice that his error was somewhat different from mine and thought that might be why I couldn't solve my problem using the ways suggested.
As I executed the .sh file on my terminal, it printed:
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m;
support was removed in 8.0
(java:5094): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap"
Gtk-Message: Failed to load module "canberra-gtk-module"
I'm not sure whether it's related to the error or not. Please help.
In my case I had a line
org.gradle.jvmargs=-Xmx6408m -XX:MaxPermSize=6408m -XX:+HeapDumpOnOutOfMemoryError
in my gradle.properties file in the project structure.
removing -XX:MaxPermSize=6408m from that file fixed an issue
As it was already said in this thread, Permanent Generation was removed in Java 8, which is used in your case. I think, the easiest solution is to remove parameters associated with Permanent Generation during program execution.
Go to the directory where you have Android Studio. Then go to the bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:
studio.vmoptions
studio64.vmoptions
Open these files and locate line with MaxPerSize parameter. It should look as follows:
XX:MaxPermSize=256m
Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.
I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.
EDIT:
There is another solution for this problem described here: https://stackoverflow.com/a/27913562/1150795.
Go to File > Other Settings > Default Project Structure > JDK location and check the path.
In case of Ubuntu Linux, we can set /usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.
-XX:MaxPermSize was deprecated in JDK 8, marked as obsolete in JDK 16, and removed in JDK 17. It was superseded by the -XX:MaxMetaspaceSize option.
Change -XX:MaxPermSize to -XX:MaxMetaspaceSize solve my problem.
ref:
https://github.com/expo/expo-cli/issues/4196#issuecomment-1035850918
https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html#removed-java-options
In my case opening $ANDROID_HOME/tools/lib/monitor-x86_64/monitor.ini and removing
XX:MaxPermSize=256m
from it did the job.
Oh I've solved this problem, I install Oracle JDK 9 when android studio runs on JDK 6 or JDK 7 (if I'm not mistaken).
so I uninstalled Oracle JDK 9, then download and install the JDK 7.
On MacOS the following clause in ./gradlew injects this option:
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\" \"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=1024m\""
fi
This file can be edited by hand after the project has been generated.
i had the same issue and i was able to solve it by adding this directly in the terminal
export JAVA_VERSION=1.8
and then try the
I was typing a program and this error occured:
BlueJ was unable to create a Java Virtual Machine(VM) to execute projects.This is a serious problem-you will not be able to create objects or execute methods till it is fixed.
I have tried uninstalling and reinstalling BlueJ.How do I fix this?
As the FAQ of BlueJ suggests you probably dont java JDK installed.
First go get it from here
(or directly from here if you want the latest version which I recommend to you).
If the problem still exists after the installation you probably have to set/ create the environment variable JAVA_HOME and include it to your environment variable PATH. You will be able to find a broad spectrum on how to do this by searching it on google.
Problem: java.exe complains about dll
We use a tool that copies-and-renames java.exe to a temp directory, i.e. /path/to/some/dir/java_foo_application.exe. [The tool is 'Yet Another Java Service Wrapper' or YAJSW. It copies-and-renames so that meaningful names show in the windows task manager ]
On some machines, corrupt java entries in the windows registry give this error when running this copied java.exe:
Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.
Solved Once Before: Uninstall and reinstall
I've had this problem once before: nd solved it by uninstalling all jdk's -- using windows "add remove programs"-- and reinstalling a newer version of java.
Note that one of the jdk's would not uninstall. I had to download special registry cleaner from microsoft to force uninstallation.
My question: Detect and Prevent?
How can one tell in advance whether a system has corrupt java registry entries?
How to prevent this corruption for the future?
Any other ways to fix this aside from uninstalling and reinstalling the jdk's?
Thanks.
To find out what the real problem, download two jar files:
first and second
remember to set:
wrapper.console.pipestreams = true
Described on this page
The Wrapper log file shows me this trace:
-set state RESTART_START->RUNNING
-Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.5', but '1.6' is required.
-Error: could not find java.dll
-Error: could not find Java 2 Runtime Environment.
process terminated
Controller State: WAITING -> PROCESS_KILLED
I solve my problem reinstalling System JRE 1.6.
Best regards!
Instead of messing with javaw you could use an executable wrapper to start your application. See for example exe4j or JSmooth.