I am a .NET developer and very new to Java. I have created a program which requires 256-bit AES encryption in .NET and Decryption in java. To include the support of 256-bit encryption in Java i downloaded the followed the steps as given in the below url
And to create the executable from jar i used java -cp "jar name". The issue is when i run the program in Netbeans the application works normally. But when i try to run the exe seperately i get the "Illegal key size" error. To refer the external jars i used
java -cp "jar name; jars/*"
where jars is folder name under which i am referring all the necessary jars. The same exe runs normally when i use 128bit encryption. Kindly let me know where i am missing out.
Note: I also tried "jar2exe" wizard trial version but the same error occurs when i use 256-bit encryption and with 128-bit it works normally.
Welcome to the Ranch
You would have to explain lots more; I cannot understand how the question relates to the thread title.
I shall move this discussion because it is too difficult for “beginning Java”.
Sounds like you are picking up a 'java' that has not had the unlimited strength files installed. If you are using Windows are you sure you installed it in both the JRE and the JDK? I suspect that Netbeans is using the JDK 'java' and your application when run from the command line is using the JRE 'java' .
Joined: Jan 15, 2013
Many thanks Richard Tookey. yes it is my mistake the JRE and JDK path which referes does not refer the policies. Really you have saved me
subject: Referring the U.S.Export Policy and localPolicy while creating the Executable Jar