This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
User.java:3: package supplier does not exist import supplier.Supplier; ^ User.java:8: cannot resolve symbol symbol : class Supplier location: class user.User Supplier supplier = new Supplier(); ^ User.java:8: cannot resolve symbol symbol : class Supplier location: class user.User Supplier supplier = new Supplier(); ^ 3 errors
Can you people please explain me , why i am gettting this problem ???
You are specifying -sourcepath ie you are saying the compiler that your User.java is in C:\java\jdk1.5\Temp directory which is not the case. Thats why you are getting this error. Use -classpath instead.
Don't put source files in original java installation directory. Always it will be prefereble to work outside from installatin directory. Use a workspace to test all applicatin. Make your workspace as relative path to all your classpaths.