i cant get the file with the file path
i was trying to read a text file in the resources file(i was using maven) but it wont work with relative path, im using filereader
9 Replies
⌛ This post has been reserved for your question.
Hey @coolsigma1003! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
the code:
This message has been formatted automatically. You can disable this using
/preferences.work❤️ :
hell nah💔:
Resources are not files
you can use
getClass().getClassLoader().getResource("shaders/FragmentShader.fs") or similar
accessing resources as files does not work when the application is packaged (e.g. in a JAR file)
see https://stackoverflow.com/q/20389255/10871900
and also https://stackoverflow.com/q/15749192/10871900💤 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.thank you it work
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
❤️
Post Closed
This post has been closed by <@1352291760360914964>.