Ā© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Figuring out path to resources in built jar - Java Community | Help. Code. Learn.
JC|HCL
Java Community | Help. Code. Learn.
ā¢
2y ago
ā¢
10 replies
š°pothicon
Figuring out path to resources in built jar
Im currently doing this to read my shader files
:
Utils.readFile("src/main/resources/assets/base/shaders/scene.vert")
Utils.readFile("src/main/resources/assets/base/shaders/scene.vert")
and it works when just testing in intellij
, but if i build the jar it no longer works as the src
/main
/resources part of the path doesnt exist
. Any solutions
?
Java Community | Help. Code. Learn.
Join
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
27,733
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Why built JAR file doesnt work?
JC|HCL
Java Community | Help. Code. Learn. / java-help
2y ago
How to get built jar during test-time (JUnit)
JC|HCL
Java Community | Help. Code. Learn. / java-help
15mo ago
Streaming jar in
JC|HCL
Java Community | Help. Code. Learn. / java-help
12mo ago