Skip to content

Commit

Permalink
Building a test app
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Dec 13, 2014
1 parent 141c075 commit 610fa1c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-project-simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libraryDependencies ++= Seq(

mainClass in Compile := Some("ExampleApp")

enablePlugins(JavaAppPackaging, JDebPackaging)
enablePlugins(JavaServerAppPackaging, JDebPackaging)

maintainer := "Josh Suereth <[email protected]>"
packageSummary := "Minimal Native Packager"
Expand Down
16 changes: 15 additions & 1 deletion test-project-simple/src/main/scala/ExampleApp.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
import java.util.concurrent._

object ExampleApp extends App {

println("Hello, world!")
val executorService = Executors newFixedThreadPool 2

while (true) {
for(i <- 0 to 5) executorService execute HelloWorld(i)
Thread sleep 5000
}

}

case class HelloWorld(i: Int) extends Runnable {
def run() {
println(s"[$i] Hello, world!")
}
}
2 changes: 2 additions & 0 deletions test-project-simple/src/templates/etc-default
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-J-Xms64m
-J-Xmx128m

0 comments on commit 610fa1c

Please sign in to comment.