package fucoin; import java.io.File; import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.actor.Address; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; import fucoin.wallet.WalletImpl; public class MainRemote { public static ActorRef remoteSuperVisorActor; public static void main(String[] args) throws InterruptedException { //Load configuration from current directory or from resources directory of jar File file = new File("application.conf"); Config config = ConfigFactory.parseFile(file); if (!file.exists()) { System.out.println("Load default application.conf"); config = ConfigFactory.parseResources("application.conf"); } else { System.out.println("Load local application.conf"); } //Init System Actor System ActorSystem system = ActorSystem.create("Test", config); Address address = new Address("akka.tcp", "Core", "127.0.0.1", 1234); System.out.println(address); String path = "akka.tcp://Core@127.0.0.1:1234/user/Main"; //System.out.println(system.actorSelection(ActorPath.fromString(path))); //System.out.println(ActorPath.isValidPathElement(""+address+"/user/Main")); ActorRef a1 = system.actorOf(WalletImpl.props(null,"","Remote1",remoteSuperVisorActor),"Remote1"); } }