what is my classpath?
hey guys. i have downloaded java spring project and i need some help finding what is the classpath of it. can smb help me out? theres no info on google. thx in advance
19 Replies
⌛
This post has been reserved for your question.
Hey @bambyzas! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
is it a Maven or Gradle project?
What do you need the classpath for?
What IDE are you using?
gradle, intellij
i need to specify path in my
application.yaml
to my keystore file
for some reason the app still cant find the keystore file. in application.yaml
i have this line, the syntax is fine, but the app still cant pick the file: keystorePath: "/src/main/resources/keystore.jks"
. any ideas?change it to
classpath:keystore.jks
maybe?
Also if it starts with /
, it's an absolute path
Why do you have your keystore in src/main/resources?for testing
Just put it in the project directory and use
keystorePath: keystore.jks
?doesnt work :/
Theoretically
keystorePath: src/main/resources/keystore.jks
should work
but I wouldn't do thatwhy?
Because you shouldn't access stuff in the classpath like that
as it doesn't work when moving stuff
i dont get it
You cannot rely on
src/main/java
always being available, especially when deploying it somewhere (e.g. as a JAR)
Hence just put it next to the application and use keystorePath: keystore.jks
Also what is the error you are getting?but i have two configs. one for dev env, other for prod
that doesn't change anything
you still don't need to write
src/main/java/...
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
There may be more classpath entry
and
classpath:
is for classpath URLsAlso ig it seems to work for this person: https://stackoverflow.com/a/25562938/10871900
Stack Overflow
How can I specify my .keystore file with Spring Boot and Tomcat?
I'm trying to set up Spring Security to work with Spring Boot's embedded Tomcat instance. There are quite a few basic samples that do this but I'm stuck where they leave off -- they do basic
@bambyzas Do you have an domain?
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.