Thanks Patrik, Problem solved :) On Thursday, December 19, 2013 1:02:49 PM UTC+5:30, Patrik Nordwall wrote: > > > > > On Wed, Dec 18, 2013 at 8:49 PM, <[email protected] <javascript:>>wrote: > >> Ignore My previous post, >> >> Got it runMain runs a specific class. I wanted to know how to use >> akka.Main concept with sbt ? >> > > sbt "runMain akka.Main com.example.HelloWorld" > > >> >> >> On Thursday, December 19, 2013 12:14:33 AM UTC+5:30, Patrik Nordwall >> wrote: >> >>> I'm not sure how the linkchecker was started, but in the end you need a >>> "static main method" in java terminology. >>> >>> It can be run with: sbt runMain >>> >>> In akka there is akka.Main: http://doc.akka.io/ >>> docs/akka/2.2.3/scala/hello-world.html >>> >>> An alternative is to use App in scala: >>> object MyMain extends App { >>> val system = ActorSystem("MySystem") >>> // ... >>> } >>> >>> or implement the main method yourself: >>> >>> object MyMain { >>> def main(args: Array[String]): Unit = { >>> val system = ActorSystem("MySystem") >>> // ... >>> } >>> >>> } >>> >>> Regards, >>> Patrik >>> >>> >>> >>> >>> On Wed, Dec 18, 2013 at 6:41 PM, <[email protected]> wrote: >>> >>>> I was taking the Principles of reactive programming on Coursera. There >>>> was and example in week 7 a linkchecker. In this example they are running >>>> a >>>> Object Directly with a main function in it using Scala IDE (not sure >>>> though). How can i mimic the same behaviour using plain sbt. If not is a >>>> minimilistic main class that can be used to run all types of actors. >>>> >>>> -- >>>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>> >>>>>>>>>> Search the archives: https://groups.google.com/ >>>> group/akka-user >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Akka User List" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> >>>> Visit this group at http://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> >>> >>> -- >>> >>> Patrik Nordwall >>> Typesafe <http://typesafe.com/> - Reactive apps on the JVM >>> Twitter: @patriknw >>> >>> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > >
-- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.
