forked from nus-cs2103-AY1819S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The project currently runs on Java 8. We should ensure compatibility with the latest public version as soon as it is out. Let's upgrade the project to run on Java 9 and update the documentation accordingly. Some of the properties in gradle.properties are no longer supported. As PermGen has been replaced with Metaspace, -XX:MaxPermSize=size has ceased support [1] and has been replaced with -XX:MaxMetaspaceSize [2]. Also, -XX:CMSPermGenSweepingEnabled has been superseded by -XX:+CMSClassUnloadingEnabled and removed in JDK 9 [3][4]. -XX:+CMSClassUnloadingEnabled however, is useless now. When PermGen was used previously, this command line argument ensured that PermGen was garbage collected [5]. However, Metaspace is automatically garbage collected [6], therefore there's no replacement for this argument. Let's remove or update these properties accordingly. Travis & AppVeyor are building the project using JDK 8. Since we are now running on Java 9, let's update them to build the project using JDK 9. To run tests using TestFX on Java 9, we have to update the dependencies in build.gradle. Let's update it according to TestFX's documentation [7]. Java 9 introduces a module system, causing internal packages such as javax.* and com.sun.* packages to be inaccessible. As our project uses these packages, our code is no longer compilable. Let's update build.gradle to import these modules. [1]: https://docs.oracle.com/javase/9/migrate/toc.htm [2]: http://java-latte.blogspot.sg/2014/03/metaspace-in-java-8.html [3]: http://www.oracle.com/technetwork/java/javase/9-removed-features-3745614.html [4]: https://stackoverflow.com/questions/3717937/cmspermgensweepingenabled-vs-cmsclassunloadingenabled [5]: https://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do [6]: http://kkgulati.blogspot.sg/2014/09/java-8-memory-model-metaspace.html [7]: https://github.com/TestFX/TestFX#java-9
- Loading branch information
1 parent
e4ddf53
commit 889a105
Showing
6 changed files
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
org.gradle.daemon=true | ||
org.gradle.parallel=false | ||
org.gradle.jvmargs=-XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=utf-8 | ||
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=utf-8 |