Skip to content

Commit dc3172c

Browse files
committed
More switching to {java command line}
1 parent 72c57dd commit dc3172c

22 files changed

+24
-27
lines changed

assertions/Assert1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Non-informative style of assert
66
// Must run with -ea:
7-
// {JVMArgs: -ea}
7+
// {java -ea Assert1}
88
// {ThrowsException}
99

1010
public class Assert1 {

assertions/Assert2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Assert with an information-expression
6-
// {JVMArgs: -ea}
6+
// {java Assert2 -ea}
77
// {ThrowsException}
88

99
public class Assert2 {

build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ class Tags {
4141
errorOutputExpected = hasTag('ErrorOutputExpected')
4242
validateByHand = hasTag('ValidateByHand')
4343
ignoreOutput = hasTag('IgnoreOutput')
44-
def argString = extract('Args:')
45-
if(argString)
46-
args = argString.split(' ')
47-
def jvmArgString = extract('JVMArgs:')
48-
if(jvmArgString)
49-
jVMArgs = jvmArgString.split(' ')
5044
exec = extract('Exec:')
5145
runFirst = extract('RunFirst:')
5246
lines.each {

collectionsindepth/ListPerformance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Demonstrates performance differences in Lists
66
// Small to keep build testing short:
7-
// {Args: 100 500}
7+
// {java ListPerformance 100 500}
88
import java.util.*;
99
import onjava.*;
1010

collectionsindepth/MapPerformance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Demonstrates performance differences in Maps
66
// Small to keep build testing short:
7-
// {Args: 100 5000}
7+
// {java MapPerformance 100 5000}
88
import java.util.*;
99

1010
public class MapPerformance {

collectionsindepth/RandomBounds.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Does Math.random() produce 0.0 and 1.0?
6-
// {Args: lower}
6+
// {java RandomBounds lower}
77
import onjava.*;
88

99
public class RandomBounds {

collectionsindepth/SetPerformance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Demonstrates performance differences in Sets
66
// Small to keep build testing short:
7-
// {Args: 100 5000}
7+
// {java SetPerformance 100 5000}
88
import java.util.*;
99

1010
public class SetPerformance {

compression/GZIPcompress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
5-
// {Args: GZIPcompress.java}
5+
// {java GZIPcompress GZIPcompress.java}
66
// {ValidateByHand}
77
import java.util.zip.*;
88
import java.io.*;

compression/ZipCompress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Uses Zip compression to compress any
66
// number of files given on the command line
7-
// {Args: ZipCompress.java}
7+
// {java ZipCompress ZipCompress.java}
88
// {ValidateByHand}
99
import java.util.zip.*;
1010
import java.io.*;

enums/VendingMachine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
5-
// {Args: VendingMachineInput.txt}
5+
// {java VendingMachine VendingMachineInput.txt}
66
import java.util.*;
77
import java.io.IOException;
88
import java.util.function.*;

0 commit comments

Comments
 (0)