MonsterDeveloper / java-telegram-bot-tutorial

Java Telegram Bot Tutorial. Feel free to submit issue if you found a mistake.
https://monsterdeveloper.gitbook.io/java-telegram-bot-tutorial/
312 stars 102 forks source link

problem running first lesson bot #1

Closed hpanahiird closed 7 years ago

hpanahiird commented 7 years ago

I want to write my first bot for telegram. I wrote the code as you said in lesson one but while i'm running this on my windows 10 laptop i get this get exception

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList
    at com.google.inject.internal.Errors.<clinit>(Errors.java:709)
    at com.google.inject.internal.InternalInjectorCreator.<init>(InternalInjectorCreator.java:62)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at com.google.inject.Guice.createInjector(Guice.java:73)
    at com.google.inject.Guice.createInjector(Guice.java:62)
    at org.telegram.telegrambots.ApiContext.getInjector(ApiContext.java:46)
    at org.telegram.telegrambots.ApiContext.getInstance(ApiContext.java:25)
    at org.telegram.telegrambots.bots.TelegramLongPollingBot.<init>(TelegramLongPollingBot.java:31)
    at MyFirstBot.<init>(MyFirstBot.java:9)
    at Main.main(Main.java:14)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableList
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 10 more

Process finished with exit code 1