1

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

Avi Turner
  • 9,682
  • 7
  • 47
  • 70
Basit
  • 8,158
  • 43
  • 107
  • 190

2 Answers2

1

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.

E-Riz
  • 29,428
  • 8
  • 89
  • 125
1

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.

Code-Apprentice
  • 76,639
  • 19
  • 130
  • 241
Basit
  • 8,158
  • 43
  • 107
  • 190