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
  • 10,234
  • 7
  • 48
  • 75
Basit
  • 8,426
  • 46
  • 116
  • 196

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
  • 31,431
  • 9
  • 97
  • 134
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
  • 81,660
  • 23
  • 145
  • 268
Basit
  • 8,426
  • 46
  • 116
  • 196