if it’s inside a JAR, it’s not a File, generally speaking. You should load the data using Class.getResourceAsStream(String)
, or something similar.
More Related Contents:
- How to load a jar file at runtime [duplicate]
- How to load Classes at runtime from a folder or JAR?
- What’s the best way to distribute Java applications? [closed]
- How to list the files inside a JAR file?
- Including jars in classpath on commandline (javac or apt)
- What causes “Unable to access jarfile” error?
- How to convert AAR to JAR
- Eclipse error: “The import XXX cannot be resolved”
- How to read a file from jar in Java?
- How to access resources in JAR file?
- Clean way to combine multiple jars? Preferably using Ant
- Execute .jar file from a Java program
- How can my Java program store files inside of its .jar file?
- Differences between “java -cp” and “java -jar”?
- Python: How can I execute a jar file through a python script
- Creating Runnable Jar with external files included
- Classpath resource within jar
- Can values defined in MANIFEST.MF be accessed programmatically?
- “Could not find the main class” error when running jar exported by Eclipse
- How to package resources in Jar properly
- Spark spark-submit –jars arguments wants comma list, how to declare a directory of jars?
- How to run a class from Jar which is not the Main-Class in its Manifest file
- How to make a runnable jar file?
- Eclipse Java; export jar, include referenced libraries, without fatjar
- Viewing contents of a .jar file [closed]
- How to build a jar using maven, ignoring test results? [duplicate]
- Why does my JAR file execute at CMD, but not on double-click?
- Read directory inside JAR with InputStreamReader
- Difference between the maven-assembly-plugin, maven-jar-plugin and maven-shade-plugin?
- Set folder for classpath [duplicate]