Question

I made a java project. It has dependencies. I have the class files. So what i did i made a classes folder and put all the class files in that folder and then add that folder to my project. All the dependencies have been removed. But i think class files also have anonymous classes. SO i am getting error at that line. Here is my project structure

Error

The error that i am getting is

The project was not built since its build path is incomplete. Cannot find the class file for com.suprema.ufe33.UFScannerClass$UFS_SCANNER_PROC. Fix the build path then try building this project

The type com.suprema.ufe33.UFScannerClass$UFS_SCANNER_PROC cannot be resolved. It is indirectly referenced from required .class files

How can i solve this error ?

Thanks

Was it helpful?

Solution

I think the problem is that the folder structure you created in the classes/ folder does not exactly match the package name of the classes you are referencing. Check the capitalization of ufe33.

By the way, it's usually better/easier to use a JAR of such dependencies instead of folders of .class files.

OTHER TIPS

I solved the issue. Yes E-Riz is right that folder structure is not right. It should be small ufe33. Also i created the jar. What i did is I ran this command where i copy all the four class files.

D:\jars>jar cf myjar.jar com\suprema\ufe33*.class

It made the jar file myjar.jar. Then i simply add this jar to my eclipse project class path and the problem solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top