To my knowledge the file has to be right in the folder where the 'this'
class resides, i.e. not in WEB-INF/classes
but nested even deeper (unless you write in a default package):
net/domain/pkg1/MyClass.java
net/domain/pkg1/abc.txt
Putting the file in to your java sources should work, compiler copies that file together with class files.
Related Contents:
- How to change webservice url endpoint?
- Convert BufferedInputStream into image [duplicate]
- Convert InputStream to byte array in Java
- How to call a SOAP web service on Android [closed]
- Is it possible to read from a InputStream with a timeout?
- Different ways of loading a file as an InputStream
- How to call a stored procedure from Java and JPA
- Tracing XML request/responses with JAX-WS
- How do I convert a String to an InputStream in Java?
- PKIX path building failed: unable to find valid certification path to requested target
- Java get available memory
- byte[] to file in Java
- How to clone an InputStream?
- PersistenceContext EntityManager injection NullPointerException
- Reading InputStream as UTF-8
- Connecting an input stream to an outputstream
- How to use multiple Scanner objects on System.in?
- How to enable TLS 1.2 in Java 7
- Why does InputStream#read() return an int and not a byte?
- How do I set the timeout for a JAX-WS webservice client?
- java.net.UnknownHostException: Unable to resolve host “”: No address associated with hostname and End of input at character 0 of
- What does InputStream.available() do in Java?
- Can we parameterize the request file name to the Read method in Karate?
- How to read all of Inputstream in Server Socket JAVA
- JBoss debugging in Eclipse
- SOAP request to WebService with java
- Java – How Can I Write My ArrayList to a file, and Read (load) that file to the original ArrayList?
- The request was rejected because no multipart boundary was found in springboot
- How To Modify The Raw XML message of an Outbound CXF Request?
- Reading a binary input stream into a single byte array in Java
- How to call a RESTful web service from Android?
- How to read file from ZIP using InputStream?
- Jersey – How to mock service
- Most efficient way to create InputStream from OutputStream
- JAX-WS = When Apache CXF is installed it “steals” default JDK JAX-WS implementation, how to solve?
- Eager / auto loading of EJB / load EJB on startup (on JBoss)
- Java Creating a new ObjectInputStream Blocks
- Simply consuming a web service in Java
- Does JAXB support xsd:restriction?
- FileNotFoundException while getting the InputStream object from HttpURLConnection
- How to convert InputStream to virtual File
- What is an .episode file..?
- How to send a SOAP request using WebServiceTemplate?
- Web service client given WSDL
- Determine the size of an InputStream
- Convert InputStream to JSONObject
- How to consume REST in Java [duplicate]
- What’s the fastest way to read from System.in in Java?
- Wrapping a ByteBuffer with an InputStream
- Looping Error on Android Emulator