Also posted here: https://stackoverflow.com/questions/78277671/classpath-error-when-running-a-compiled-jar-file-locally
Also posted here: https://www.javaprogrammingforums.com/java-ides/45641-issue-running-compiled-jar-file-locally.html
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Lou Hamers wrote:
I'm not familiar with IBM MQ, but if you're keeping things inside the jar, what you could likely do here is setup an SSL context/connection programatically. A quick search found something called "MQConnectionFactory" which seems relevant, but again I've never used this product. Provide a connection factory (which probably needs a keystore/truststore... takes a bit of code), and you could load whatever you need straight out of your jar as an InputStream. Been some years since I've done anything similar, but it's doable.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Tim Holloway wrote:
It's a bit stickier than that.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
mitu kumarsgp wrote:Can you please explain this behaviour? Why does it work on the server and not when I manually run the compiled JAR locally?
And how do I make this work?
Ron McLeod wrote:
mitu kumarsgp wrote:Can you please explain this behaviour? Why does it work on the server and not when I manually run the compiled JAR locally?
And how do I make this work?
Your post on StackOverflow had a comment to see the post: Classpath resource not found when running as jar. Did that provide any help?
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Tim Holloway wrote:Normally, you'd use a keystore when you're an SSL server, not an SSL client. The certificate chain for Java TLS clients is located within the JAVA_HOME directory tree. Details on how to add third-party certs to that are something I'd have to refresh my memory on.
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|