0

I am new to java and AKKA toolkit. I have created a JAVA project and tried to include the below code

    package com.postgresqltutorial;

    import akka.actor.ActorSystem;

    public class App {
        public static void main(String[] args) {
        
        final ActorSystem system = ActorSystem.create("QuickStart");
      }

    }

I have used AKKA libs in referenced libs as akka-actor_2.12-2.6.15.jar, akka-protobuf_2.12-2.6.15.jar and akka-stream_2.12-2.6.15.jar.

And my project structure is like project structure

Please help me to resolve this.

1 Answers1

0

Most likely you've not referenced the libraries correctly. That is why you should use a build tool such as Maven. Check the referenced link to understand how it works. It handles the libraries for you, you just have to add them in the pom.xml file.

Example:


<dependencies>

    <dependency>
        <groupId>com.typesafe.akka</groupId>
        <artifactId>akka-actor_3</artifactId>
        <version>2.6.18</version>
    </dependency>
    
</dependencies>
Renis1235
  • 4,116
  • 3
  • 15
  • 27
  • Thank you for the answer. Is it possible to include the jars without creating the Maven project? This means I just want to go with a basic Java project. – Jack Techie Mar 04 '22 at 10:33
  • Yes, you can. Unfortunately, I do not use eclipse but take a look at this https://stackoverflow.com/questions/3280353/how-to-import-a-jar-in-eclipse – Renis1235 Mar 04 '22 at 11:39