I am working with google apis. I created a java file called mygoogle with no package and placed it directly in the root directory of my google folder. Also in the root directory of my google folder is the googleapi.jar file that is needed to compile and run mygoogle. I can compile mygoogle just fine but I cannot run it. From the google directory I do: java -cp googleapi.jar mygoogle 1234PVQFHIpUjaP10MscjPLxgJQy1U5 search Foo and I get: Exception in thread "main" java.lang.NoClassDefFoundError: mygoogle How do I get around that?