Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. List<String> allJvmArgs
  2.  
  3. The full set of arguments to use to launch the JVM for the process. This includes arguments to define system properties, the minimum/maximum heap size, and the bootstrap classpath.
  4.  
  5. package com.examples;
  6.  
  7. public class AllJvmArgumentsInJavaExecBug {
  8.  
  9. public static void main(String[] args) {
  10. System.out.println("Hello From Java");
  11. }
  12.  
  13. }
  14.  
  15.  
  16. // File: build.gradle
  17. apply plugin: 'java'
  18.  
  19. task(runJavaExecNormal, dependsOn: 'classes', type: JavaExec) {
  20. main = 'com.examples.AllJvmArgumentsInJavaExecBug'
  21. classpath = sourceSets.main.runtimeClasspath
  22.  
  23. }
  24.  
  25.  
  26. task(runJavaExecArgumentSetExample1, dependsOn: 'classes', type: JavaExec) {
  27. main = 'com.examples.AllJvmArgumentsInJavaExecBug'
  28. classpath = sourceSets.main.runtimeClasspath
  29. allJvmArgs = [ '-Xms10240m', '-Xmx20280m']
  30.  
  31. }
  32.  
  33. task(runJavaExecArgumentSetExample2, dependsOn: 'classes', type: JavaExec) {
  34. main = 'com.examples.AllJvmArgumentsInJavaExecBug'
  35. classpath = sourceSets.main.runtimeClasspath
  36.  
  37. List<String> argumentList = new ArrayList<String>();
  38. argumentList.add('-Xms10240m')
  39. argumentList.add('-Xmx20280m')
  40. allJvmArgs = argumentList
  41. }
  42.  
  43. P:githubgradleJavaExecAllJvmArgs>gradle
  44.  
  45. FAILURE: Build failed with an exception.
  46.  
  47. * Where:
  48. Build file 'P:githubgradleJavaExecAllJvmArgsbuild.gradle' line: 14
  49.  
  50. * What went wrong:
  51. A problem occurred evaluating root project 'gradleJavaExecAllJvmArgs'.
  52. > java.lang.UnsupportedOperationException (no error message)
  53.  
  54. * Try:
  55. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  56.  
  57. BUILD FAILED
  58.  
  59. Total time: 3.733 secs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement