0

I was working with some encryption and SSL handshake errors and I found that the fix was to place new UnlimitedJCEPolicy files in my java7. Two files namely local_policy.jar and US_export_policy.jar needs to be replaced. I don't have write permissions for java folder in my local machine. How can I refer them externally? I would like to add them in eclipse run configuration in arguments tab.

Arun
  • 3,701
  • 5
  • 32
  • 43
  • are you add your jars to path. maybe it's fixed. – vahid Dec 23 '16 at 18:06
  • It's not working. This should be taken by java during VM startup – Arun Dec 23 '16 at 18:10
  • your path must refer befor exist path. if you used linux : can you edit ~/.bashrc file ? "export PATH=/home/username/myjarlibrary:$PATH . in windows you can edit PATH enviroment. – vahid Dec 23 '16 at 18:13
  • @vahid: Java doesn't use PATH (except for _native_ DLLs on Windows only); for jars it normally uses envvar CLASSPATH _or_ a commandline option. But _crypto providers_ are special; they have to be specifically in the JRE directories, not merely in the classpath. – dave_thompson_085 Dec 23 '16 at 20:35
  • @dave_thompson_085 thank you. you right. how about -Xbootclasspath/p:my.jar command? – vahid Dec 23 '16 at 20:54
  • @vahid: aside from the general caveat that any `-X` may change without notice, I don't know how bootclasspath interacts with lib/ext; they aren't quite the same thing but are in the same area of functionality. Try it and let us know :-) – dave_thompson_085 Dec 25 '16 at 09:44

1 Answers1

1

You can refer this link for some more ideas: How to avoid installing "Unlimited Strength" JCE policy files when deploying an application?

But I think the easiest way should be get write permission in your local machine, it will save you lots of time

Community
  • 1
  • 1
mikero
  • 148
  • 1
  • 3
  • 10
  • I was able to hot server by the method mentioned by using reflection. But if I could add those jars with VM arguments, it would be well and good. – Arun Dec 23 '16 at 21:54