Did you check that the file is actually in the created jar?
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,484
Solved Threads: 494
Skill Endorsements: 17
All I can say at the moment is check your spelling. On windows when not packaged in a jar it will not be case sensitive, but once is packed into the jar it is case sensitive.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,484
Solved Threads: 494
Skill Endorsements: 17
Any specific reason you want to load resource relative to a class and not relative to a classloader using MyClass.class.getClassLoader().getResourceAsStream("my/pkg/file.txt") ?
~s.o.s~
Failure as a human
12,247 posts since Jun 2006
Reputation Points: 3,307
Solved Threads: 787
Skill Endorsements: 55
Question Answered as of 1 Year Ago by
masijade
and
~s.o.s~