Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass MaxPermSize to Java 8+ #203

Closed
jroper opened this issue Mar 27, 2014 · 9 comments
Closed

Don't pass MaxPermSize to Java 8+ #203

jroper opened this issue Mar 27, 2014 · 9 comments

Comments

@jroper
Copy link
Member

jroper commented Mar 27, 2014

Java 8+ does not support -XX:MaxPermSize, and outputs a big ugly error message if you supply it:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

The script generated by SBT native packager should not pass a MaxPermSize argument to Java 8 JVMs.

@jroper
Copy link
Member Author

jroper commented Mar 27, 2014

Script to actually get the Java version in bash is a little harder than you might think, because java -version writes to standard error. The following works with JDK6/7/8 on OSX:

( java -version 3>&1 1>&2- 2>&3- ) | sed -n 's/java version "\(.*\)"/\1/p'

@muuki88
Copy link
Contributor

muuki88 commented Mar 28, 2014

Works on Ubuntu, too. I found a shorter alternative

version=$(( java -version 3>&1 1>&2- 2>&3- ) | sed -n 's/java version "\(.*\)"/\1/p')
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')

The last one is already used in the bash script :)

@kardapoltsev
Copy link
Member

Also on Gentoo and Debian Wheezy.

@muuki88
Copy link
Contributor

muuki88 commented Mar 28, 2014

@kardapoltsev , I'll provide a pull request in a few minutes. You mind take a look?

muuki88 added a commit that referenced this issue Mar 30, 2014
rtyley added a commit to rtyley/sbt-launcher-package that referenced this issue Apr 22, 2014
This change stops this annoying message being written to stderr (which can
cause IntelliJ to freak):

```
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
```

See also:

https://bugs.openjdk.java.net/browse/JDK-6964458
sbt/sbt-native-packager#203
https://github.com/typesafehub/activator/issues/422
@aoberoi
Copy link

aoberoi commented Nov 9, 2014

i installed sbt using Homebrew. I see this warning every time i run my project. I don't think its a problem with the sbt-native-packager but i'm unsure where I should look to silence that warning. Any ideas?

@muuki88
Copy link
Contributor

muuki88 commented Nov 9, 2014

I think this relates to the sbt-launcher project, which uses a very old version of the sbt-native-packager

@aoberoi
Copy link

aoberoi commented Nov 9, 2014

@muuki88 thanks. i think sbt/sbt-launcher-package#67 is the right place to follow up so i'll ask my question there.

@TshepoMokgoatjane
Copy link

Hi guy, I am facing this issue and this is how my STS.ini file looks like:

-vm
C:/Program Files/Java/jdk1.8.0_60/bin
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-XX:MaxPermSize=512m
-Xverify:none
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m

The message I get is :

Nov 12, 2015 12:07:02 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1011 ms
Nov 12, 2015 12:07:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 702 ms
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

I'm running Windows 8.
Spring Tool Suite

Version: 3.7.1.RELEASE
Build Id: 201510041213
Platform: Eclipse Mars.1 (4.5.1)

Copyright (c) 2007 - 2015 Pivotal Software, Inc.
All rights reserved. Visit http://spring.io/tools/sts

This product includes software developed by the
Apache Software Foundation http://www.apache.org

What am I missing?

@muuki88
Copy link
Contributor

muuki88 commented Nov 13, 2015

I think you are on the wrong issue-list here. This sbt-native-packager not eclipse ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants