• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Referring the U.S.Export Policy and localPolicy while creating the Executable Jar

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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

http://www.ngs.ac.uk/tools/jcepolicyfiles

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.
 
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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”.
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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' .
 
Gurumoorthy Doraiswamy
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic