Question

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:

warning

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top