package is not found, even though it's in both build classpath and runtime classpath
I am unable to compile a Java pro开发者_StackOverflowgram because some of the imported packages are not found even though they are in both the build classpath and runtime classpath.
The image below shows the problem. I have highlighted the gdata-media package in eclipse. It corresponds to the first compile error.
screenshot http://img3.imageshack.us/img3/5199/classesnotavailable.png Click for full size
What am I doing wrong?
The Eclipse classpath and project setup has no bearing on the command line javac tool
What's the command you are using to compile your code? Do you have something like -cp or -classpath there? Make sure that the jar file containing YouTubeUpld class is part of that -classpath parameters. More on how to set up CLASSPATH can be found here. If you do not specify the classpath explicitly javac reads it from the CLASSPATH environment variable
By the way why can't you just launch your app from Eclipse since it compiles there?
精彩评论