Click to See Complete Forum and Search --> : How to recognize a JAR import (using Eclipse & Tomcat)?


Tab
January 17th, 2007, 05:08 PM
Not sure if this is Eclipse-related or not...

I'm working on something that already uses the O'Reilly multipart servlet, which is contained in the oreilly.jar. Also in that jar is the Base64Decoder class, but that has not been used as of yet (in this project).

Someone else set the project up, and I'm new to Eclipse.

The multipart class is recognized and compiled, but now that I've added a call to the static method decodeToBytes, I'm getting
"The method decodeToBytes(String) is undefined for the type Base64Decoder"

The call is...

fileContent =Base64Decoder.decodeToBytes(myStringHere);

(fileContent is a byte array).

Since it already recognizes the multipart class from the same JAR I'm unclear why it's not recognizing this call to a different class. I've cleaned and rebuilt everything. Do I have to add this class in somewhere (and if so, where?). What am I missing?

Thanks

dlorde
January 18th, 2007, 08:54 AM
Have you imported the Base64Decoder class in the file where you are using it?

Everything should be made as simple as possible, but not simpler...
A. Einstein

Tab
January 18th, 2007, 09:02 AM
Yes, I should have mentioned that, but yes, I have an import com.oreilly.servlet.BaseDecoder64 at the top with the other imports.