Setting Truststore

Answered

Hello, 

for some resons IntelliJ has problems with my trust store.  My truststore is cacert - and there I added all my certificates, this I have confirmed.  However IntelliJ is telling me that the main class Djavax.net.ssl.truststore=trust.jks can not be found.  How do I tell IntelliJ to use my cacert by default.  

Thanks a lot in advance

Daniel 

0
12 comments

Please clarify the problem. Post the screenshot of the error and describe when do you get. How can one reproduce it?

0
Avatar
Permanently deleted user

Well - the output is in german.  But thats the only thing I have.  I don't know how to reproduce it.  I just run maven then it says: Error: Main class Djavax.net.ssl.truststore=trust.jks could not be found or loaded.  The weird thing is - on eclipse it works, and I have no clue why.  

0

Where do you specify this JVM option? It looks like you forgot "-", it should be "-Djavax.net.ssl.truststore=trust.jks".

0
Avatar
Permanently deleted user

This is the weird thing - I don't do it in IntelliJ at all .  I am sorry, I just switched to IntelliJ, checked out the code and I am confused.

0

Do Find in Path: https://www.jetbrains.com/help/idea/2016.3/find-and-replace-in-path.html.

Search for "Djavax.net.ssl.truststore=trust.jks" string.

Probably it comes from pom.xml jvmArgs.

0
Avatar
Permanently deleted user

I did what you proposed however I did not find anything.  And this is not project specific ... all projects have the same problem.  Where can I change the default truststore to cacert ?

1

Please upload the project so that we can find what's wrong: https://intellij-support.jetbrains.com/hc/articles/206869619.

0
Avatar
Permanently deleted user

Sorry I cant do that

0
Avatar
Permanently deleted user

But where can I set the default truststore

0

Check system environment variables in case some global Java variables are set incorrectly there.

0
Avatar
Permanently deleted user

1) keep cacerts in in C:\xx\java.cacerts

Note the VM args : -Djavax.net.ssl.trustStore=C:\xx\java.cacerts -Djavax.net.ssl.trustStorePassword=xxxxxxx

2) You should pass vm args as mentioned below in 2 places

a)File>Settings>.....>Maven>Importing>Vm Options for importer

b)File>Settings>....>Maven>Runner>VM Options

 

This will let your IntelliJ to use those certs while running maven build or import.

0

Please sign in to leave a comment.