Reputation: 4572
I'm trying to use "Jasypt" in my Java project, but I'm having some troubles. I'm using NetBeans IDE.
I download this file, then I right clicked on my project -> Properties -> Library -> Add Jar/Folder. So, I add the folder of Jasypt (uncompressed, called "jasypt-1.9.0").
I can see the Jasypt folder in my project now, but when I try to use it, I have troubles. When I try to instantiate the "BasicPasswordEncryptor" (following my code) I got an error.
import org.jasypt.util.text.BasicPasswordEncryptor;
public class GerenciarConexao {
public boolean Login(String nome, String senha){
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
// (later will add the code)
return true;
}
}
This is the "inline error":
package org.jasypt.util.text does not exist
If I tr to build my project, I got the following error:
C:\Users\silvio\Documents\NetBeansProjects\LocusView\src\control\GerenciarConexao.java:6: error: package org.jasypt.util.text does not exist
import org.jasypt.util.text.BasicTextEncryptor;
C:\Users\silvio\Documents\NetBeansProjects\LocusView\src\control\GerenciarConexao.java:15: error: cannot find symbol
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
symbol: class BasicPasswordEncryptor
location: class GerenciarConexao
C:\Users\silvio\Documents\NetBeansProjects\LocusView\src\control\GerenciarConexao.java:15: error: cannot find symbol
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
symbol: class BasicPasswordEncryptor
location: class GerenciarConexao
3 errors
About this import, I don't know why is this path, I just find a question about Jasypt in StackOverflow and copy/paste the import to my project - I didn't find a easy guide that tell me how to install/use the Jasypt.
Thanks friends, waiting for answers - and sorry about my nonsense.
Upvotes: 2
Views: 5484
Reputation: 736
BasicPasswordEncryptor does not exist use BasicTextEncryptor instead
Upvotes: 2