I am using Netbeans and I am trying to use the base64 library, but it gives me “cannot find symbol”
OutputStream b64 = new Base64.OutputStream(os);
First I tried adding it like this
import org.apache.commons.codec.binary.Base64;
Which gives me a package does not exist, so I went to this website and downloaded the jar file. I downloaded for more than one website, but last one was http://www.java2s.com/Code/Jar/o/Downloadorgapachecommonscodecjar.htm
I added the library by right click on libraries, add Jar/Folder and selecting the .jar file that was downloaded. This gives me a package does not exist.
Can someone explain to me why this happens.
Note: My goal is to use java robot to copy a part of the screen and send it as a post request.
Download the jar from Apache: http://commons.apache.org/codec/download_codec.cgi
The desired package and class is available in the jar i.e.
commons-codec-1.7.jarAdd the above Jar from this distribution and let me know, if you still get the issue.
Though I think, to get the output stream, you would want to use org.apache.commons.codec.binary.Base64OutputStream.