1

I have developed an Matlab code for stegnography which requires some preprocessing to be done by a Java file.

The java file aes1.java contains the function encrypt(String s) which needs to be called by matlab code:

javaaddpath('C:\Users\Aneesh\Desktop\BE_Project');
disp(char(javaMethod('hash', 'aes1', userText)));

I am getting the following error:

Error using javaMethod
No class aes1 can be located on the Java class path
Error in project_mod (line 11)
disp(char(javaMethod('hash','aes1',userText)));"

Versions I'm using:

  • Matlab 2013a
  • Java 1.6

Any help would be greatly appreciated!


Update:

I have a .jar file which contains all the classes i need. I've imported it and tried using it but I'm still getting the same error!

mkierc
  • 1,193
  • 2
  • 15
  • 28

1 Answers1

0

Please take a look at the documentation. javaaddpath adds one or more folders of java Archive (jar) files.

You need to compile your java file to a class-file and add it using javaclasspath

Daniel
  • 36,610
  • 3
  • 36
  • 69