new user here! I know there's similar questions with answers to this, but I don't know how to apply them to my case, so sorry if it's repetitive!
So... I'm trying to make my first bot for Telegram and I've decided to use Java. I'm following this tutorial and copypasted the code from the two example classes (EchoBot and Main). The only thing I changed is the token with the token I got from the BotGodfather on Telegram. I'm using Eclipse on Ubuntu 18.04.1 as IDE so I started by making a Java project and then configured it as a Maven project. This is the code of my pom.xml: `
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>EchoBot</groupId>
<artifactId>EchoBot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>EchoBot</name>
<dependencies>
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>3.6.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
`
When I run the program I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Module at org.telegram.telegrambots.ApiContext.getInjector(ApiContext.java:46) at org.telegram.telegrambots.ApiContext.getInstance(ApiContext.java:25) at org.telegram.telegrambots.bots.TelegramLongPollingBot.(TelegramLongPollingBot.java:17) at pearlbot.EchoBot.(EchoBot.java:8) at pearlbot.Main.main(Main.java:17) Caused by: java.lang.ClassNotFoundException: com.google.inject.Module at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 5 more
What could the problem be? Keep in mind that I don't even know what Maven is, so if it's something related to it, you'll need to explain what's wrong as if you were talking to a child! ^^''