title: get file from src/test/resources using getResourceAsStream()
body: <p><a href="https://i.stack.imgur.com/V8ujV.png" rel="nofollow noreferrer">file structure here</a></p>
  
  <p>++add
  i want to validate json based on json schema file.
  I currently save json as string , and try to read json schema file(which is test.json), then validate. 
  however, reading schema file is always null..</p>
  
  <p>below code are I tried so far. </p>
  
  <p>++original post.</p>
  
  <p>this is my current situaction.
  I've tried many ways to get the file(test.json)...</p>
  
  <p>like</p>
  
  <pre><code>InputStream in;
  
  
  
  1.  in= valid.class.getResourceAsStream("/test.json"); 
  2.  in = getClass().getClassLoader().getResourceAsStream("/test.json");
  3.   in = Thread.currentThread().getContextClassLoader().getResourceAsStream("//test.json");
  4. in=getClass().getResourceAsStream("/test.json"); 
  
  5. in=ValidationUtils.class.getResourceAsStream("../resources/ds/test.json"); 
  
  6. ClassLoader classLoader =  getClass().getClassLoader();
     in = classLoader.getResourceAsStream("test.json");
  7.in=getClass().getResourceAsStream("/ds/test.json"); //tried just now
  
  
  System.out.println("in"+in); //this is always null.
  </code></pre>
  
  <p>nothing.. work.. above..
  please help me... </p>