LibraryOfCongress / bagger

The Bagger application packages data files according to the BagIt specification.
Other
120 stars 19 forks source link

"Could not find or load main class Files" error when spaces exist in Windows file path #45

Closed swaldenAC closed 7 years ago

swaldenAC commented 7 years ago

Using Java Runtime Environment 1.8, Bagger 2.7.5, Windows 7 Enterprise

When I first downloaded Java, I had to manually set the JAVA_HOME environmental variable through Windows - it might have been helpful to have some pointers for how to do this in the install instructions.

Once I did that, every time I opened the bagger.bat file, I got the error "Could not find or load main class Files." After a lot of trial and error, we tracked this down to the fact that both Java and Bagger were installed in the "Program Files" folder, and the space in the file name was confusing Bagger. The issue was resolved by moving both Java and Bagger to a different directory, but the instructions should either specify not to save Bagger in a file path with a space, or the program should handle this failure more gracefully.

johnscancella commented 7 years ago

@swaldenAC Sorry that the instructions were not clear to you. Thank you for informing me about the path issue. During testing we only run it from the downloads directory which does not contain a space. I have corrected the code and it should be fixed in version 2.7.7