Scala compile server - VM warning [duplicate] - java

This question already has answers here:
PermGen elimination in JDK 8
(6 answers)
Closed 8 years ago.
I'm using java + scala (with sbt) at one project.
Language info:
nazar#desktop:~⟫ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
nazar#desktop:~⟫ scala -version
Scala code runner version 2.10.4 -- Copyright 2002-2013, LAMP/EPFL
When I'm running any main() I got a strange warning prompt:
I couldn't figure out this behaviour.
UPDATE:
I checked sbt options it has the same behaviour:
nazar#desktop:~⟫ sbt -version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Thanks for so fast explanation new features for Java 1.8!
But how to solve occurrence of MaxPermSise warning?
here is content of idea.vmoptions:
-server
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Dawt.useSystemAAFontSettings=lcd
Eclipse has eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-8-oracle/bin/java
-/home/nazar/optional/java/jdk1.8.0/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx1024m
-Dorg.eclipse.swt.browser.IEVersion=10001
UPDATE2
I deleted from both configuration files all lines which contain MaxPermSize.
But this error warning keep arising (when main() is running, and run sbt -version at the terminal).
Any suggestions?

The PermGen management has changed in Java 8. IIRC, it's managed directly in the OS memory. Consequently, limitations and customizations used until then are not available anymore. Particularly, MaxPermSize does not have any meaning anymore. I suppose intellij does have this option by default when it runs a sbt application.
You'll find more information about changes in Java 8 here : http://openjdk.java.net/projects/jdk8/milestones

Related

Eclipse_Photon: "Error: Could not create the Java Virtual Machine" while executing java main method

Please, can someone help me resolve this issue? I've tried solution mentioned at https://stackoverflow.com/a/12333879/7415499, however, this also didn't work out for me.
Eclipse Version:
Version: Photon Milestone 3 (4.8.0M3)
Build id: 20171102-1036
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
Note: The error is not coming while launching the eclipse.exe, but rather when I am executing a main() method
Eclipse_Error_Screenshoot
eclipse.ini file is modified as below:
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
C:\Users\DELL\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.600.v20170921-0935
-product
org.eclipse.epp.package.java.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx512m
--add-modules=ALL-SYSTEM
The line -vmargs C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe is completely wrong.
-vmargs must be on a line on its own, If you want to specify a JRE/JDK location you use -vm followed by a separate line containing the JRE/JDK path - this must be above any -vmargs line.
So:
-vm
C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe
-vmargs
Note that this only sets the JRE/JDK that Eclipse uses to run. You should also set the JRE/JDK used to run programs from with Eclipse - this is in the Preferences in 'Java > Installed JREs'.
There seemed to be an issue while tweaking with the eclipse.ini file and my Java installation. After performing java installation and downloading new eclipse ver, all worked well

Why after reboot IDE Eclipse print error?

After installing IDE Eclipse mars.2 from official site's installer for linux64 I write some "Hello worlds's!" and all working. But later, after I reboot machine something happening with IDE and any projects not compiling, Eclipse closing with error:
JVM terminated. Exit code=127
/usr/lib/jvm/java-8-oracle/jre/bin/java
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-jar /home/user/eclipse/java-latest-released/eclipse//../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/user/eclipse/java-latest-released/eclipse/eclipse
-name Eclipse
--launcher.library /home/user/eclipse/java-latest-released/eclipse//../../../.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so
-startup /home/user/eclipse/java-latest-released/eclipse//../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.appendVmargs
-exitdata 15800d
-product org.eclipse.epp.package.java.product
-install /home/user/eclipse/java-latest-released/eclipse
-vm /usr/lib/jvm/java-8-oracle/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-jar /home/user/eclipse/java-latest-released/eclipse//../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
Strating from console sent this error:
/usr/lib/jvm/java-8-oracle/jre/bin/java: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_renderer_set_alpha
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
I tried to reinstall from installer and tried starting from extracted archive from official site, but every time until machine not rebooted, all Ok. Also I tried remove oracle-java8 and installing openjdk-8, but I got the same result. I tried this topic Ubuntu 12.10 libgtk-3-0 Missing Symbols, but it not helped.
My "uname -a":
Linux WORKSTATION 4.3.0-1-amd64 #1 SMP Debian 4.3.5-1 (2016-02-06) x86_64 GNU/Linux
My "java -version":
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
Anyone have the same problem earlier?

Error launching Eclipse 4.4 "Version 1.6.0_65 of the JVM is not suitable for this product." [duplicate]

This question already has answers here:
Eclipse in OS X uses different version of Java than CLI
(6 answers)
Closed 8 years ago.
I have a problem launching Eclipse 4.4 on my Mac. I'm getting the following error:
"Version 1.6.0_65 of the JVM is not suitable for this product."
I have the latest version installed. When I'm running java -version I'm getting:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
Here is my eclipse.ini file where I already tried to explicit set the -vm parameter to my jdk1.8:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
Here's how to fix this error when launching Eclipse:
Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.7 or greater is required.
Go and install latest JDK
Make sure you have installed 64 bit Eclipse
Your -vm argument seems ok BUT it's position is wrong. According to this Eclipse Wiki entry :
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
So your -vm argument is not taken into account and it fails over to your default java installation, which is probably 1.6.0_65.
Please check if you got the x64 edition of eclipse. Someone answered this just a few hours ago.

eclipse java - crashing on linux

I am currently using openSuSE with XFCE and I installed Eclipse through YAST. Ecipse is version 3.4.0 and usually it crashes for no reason but I have been able to recreate the error when I write the the '.' in import java.io.*; and the 'err' in System.err.println();.This is the error message eclipse emits:
JVM terminated. Exit code=127
/usr/bin/java
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar /usr/lib64/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /usr/lib64/eclipse//plugins/org.eclipse.platform_4.3.0.v20130605-2000/splash.bmp
-launcher /usr/lib64/eclipse/eclipse
-name Eclipse
--launcher.library /usr/lib64/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130521-0416/eclipse_1506.so
-startup /usr/lib64/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-exitdata 1cd0022
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar /usr/lib64/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
java -version returns
java version "1.7.0_40"
OpenJDK Runtime Environment (IcedTea 2.4.1) (suse-8.18.1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b50, mixed mode)
You need to look at the .log file to resolve the problem. It is located in the workspace/.metadata/.log . It will tell you why it is crashing and will give you the stacktrace of the issue.
You might want to try adding
org.eclipse.swt.browser.DefaultType=mozilla
to eclipse.ini file.

JVM terminated. Exit code=8.. How can i resolve it in Ubuntu?

I get this error from eclipse(installed on Ubuntu 13.04):
JVM terminated. Exit code=8
/usr/bin/java
-Xms40m
-Xmx512m
-jar /home/davide/Scaricati/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os linux
-ws gtk
-arch x86
-showsplash /home/davide/Scaricati/eclipse//plugins/org.eclipse.platform_4.2.2.v201302041200/splash.bmp
-launcher /home/davide/Scaricati/eclipse/eclipse
-name Eclipse
--launcher.library /home/davide/Scaricati/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120913-144807/eclipse_1502.so
-startup /home/davide/Scaricati/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 730004
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx512m
-jar /home/davide/Scaricati/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
How can i resolve it? .
It is probably because you are using incompatible JVMs. You probably
ran an update the settings were changed in the background. This is
what worked for me:
1) Run: sudo update-alternatives --config java
2) Choose a different JVM
www.anintegratedworld.com/ubuntu-eclipse-jvm-terminated-exit-code8/
It should need java files/resources to install
Type
1)java -version
if it shows not found...
then type
2)export PATH=/home/Desktop/jdk1.8.0_111/bin:$PATH
3)java -version
then it displays (java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) Server VM (build 25.111-b14, mixed mode))
4)now try installing by typing ./eclipse after going to the path

Categories