user1800979
user1800979

Reputation: 121

Typesafe Console Configuration for Java application

I have an application using play that is built using Java. I wish to use the Typesafe Console for my application to monitor Akka, However I am unable to configure it as I am unable to find configuration details for Java. Also, couldn't find any references to able Typesafe console for java application.

I googled and found sample showing Typesafe console configurations for a Scala application. Tried following the same guidelines for java but it didn't yield any result.

I have downloaded binary distribution and written a sample application in Java. Made changes in build.scala referring Scala sample application and then started Atmos(bin/typesafe-console atmos) & Console UI (bin/typesafe-console ui). I'm getting error :

[info] Running com.typesafe.atmos.sample.GreetingApplication 
[error] No such file or class on classpath: com.typesafe.atmos.sample.GreetingApplication
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
        at scala.sys.package$.error(package.scala:27)

Any help on Build.scala configuration for Java application will be highly appreciated.

Upvotes: 4

Views: 998

Answers (1)

user1800979
user1800979

Reputation: 121

Received response from 'Peter Vlugter' on another forum for the same problem.

Deeply grateful to him for his valuable contribution.

Configuration is the same for Java as it is for Scala.

Play projects use sbt, whether they're Scala or Java projects, and sbt configuration is always in Scala.

I've created a sample project that adds Typesafe Console to a Play Java project:

https://github.com/pvlugter/hello-atmos-play-java

I've started with the java hello world sample project:

https://github.com/playframework/playframework/tree/2.1.3/samples/java/helloworld

I've added a simple actor to this sample to be traced. I assume you have an Akka actor system to trace within your Play application.

Adding the developer Typesafe Console to the project with sbt-atmos is in this commit:

https://github.com/pvlugter/hello-atmos-play-java/commit/b9d6e5590e10b2ac8cbbb6254b3298a73e356799

Cheers,
Peter Vlugter

Upvotes: 3

Related Questions