Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the `shift` command of cmd.exe is not shift `%*`. and use delayed-expansion. immediate expansion cause many troubles of special-characters in arguments.
- Loading branch information
Showing
3 changed files
with
105 additions
and
60 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
13 changes: 12 additions & 1 deletion
13
src/sbt-test/windows/java-app-archetype/src/main/scala/test/Test.scala
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,5 +1,16 @@ | ||
package test | ||
|
||
import scala.collection.JavaConversions._ | ||
|
||
object Test extends App { | ||
println("SUCCESS!") | ||
override def main(args: Array[String]): Unit = { | ||
for((x,i) <- args.zipWithIndex) println("arg #" + i + " is [" + x + "]") | ||
for((k,v) <- System.getProperties if k.startsWith("test.")) println("property(" + k + ") is [" + v + "]") | ||
if(System.getenv("show-vmargs") == "true"){ | ||
for((x,i) <- java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().zipWithIndex){ | ||
println("vmarg #" + i + " is [" + x + "]") | ||
} | ||
} | ||
println("SUCCESS!") | ||
} | ||
} |