I have a problem. Im doing an installer for my program, but how I tell to class which is the path of installation
new FileInputStream(" pathInstallation /DESTest.txt")
Greetings
how I stick the path on the classpath?
Use Class.getResource
or Class.getResourceAsStream
methods.
The resource is any file which is located next to your compiled .class file. Pass the name of the file (without the path) to one of these methods and read its content.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.