Hi,
I'm trying to play around with Google Guice and I can't seem to get it set up properly.
I have installed it as follows:
Code:
sudo apt-get install libguice-java libguice-java-doc
Following this tutorial, I am trying to compile this simple program:
Code:
import com.google.inject.*;
public class GumRunner {
public static void main(String args[]){
Injector injector = Guice.createInjector();
System.out.println(injector);
}
}
and I get the following error when compiling:
Code:
$ javac GumRunner.java
GumRunner.java:1: error: package com.google.inject does not exist
import com.google.inject.*;
^
GumRunner.java:7: error: cannot find symbol
Injector injector = Guice.createInjector();
^
symbol: class Injector
location: class GumRunner
GumRunner.java:7: error: cannot find symbol
Injector injector = Guice.createInjector();
^
symbol: variable Guice
location: class GumRunner
3 errors
Any ideas as to why this isn't working? I'm a newbie with Java, so please be gentle!
Bookmarks