I am trying to get a list of videos from a specific user using the YouTube GData Java library / API.
However, when I try to create a service using YouTubeService service = new YouTubeService("Cyphon-MyCampusPulse-1", YOUTUBE_API_KEY); I get the following exception at runtime:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException at scrapers.YouTubePulseScraper.<init>(YouTubePulseScraper.java:37) at scrapers.YouTubePulseScraper.main(YouTubePulseScraper.java:153) Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more
I am not sure how this exception relates to what I am doing. Any hints are welcome.
source share