Skip to content

Diagnosing issue with resources #1662

Answered by lefou
hmf asked this question in Q&A
Jan 10, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Out of memory, I'm not sure, the resource path will ever be valid if it starts with a dot ("./"). Also, if the path isn't absolute, it is relative to the package of the class. So unless classOfChart is in the default package, you may want to try an absolute path: classOfChart.getResource("/data/ChartPerformanceBenchmark25Hz_V8.1.1_JDK8u112.csv"), as the resources are put into the top of the archive (or when speaking about packages in the classpath: into the default package).

Resources are not put into out/<..>/compile.dest. Instead they are added to the classpath or packaged into the jar, depending whether you use run or jar target.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hmf
Comment options

Answer selected by hmf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants