Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
JAVA load List of files other way

Hello guys i am Java amater so be nice please :) . I want to load my list of files as i load my pictures.

Image playerImg = new Image(getClass().getResourceAsStream("/imgs/janosikos.png"));
    ImageView imageView = new ImageView(playerImg);

Because i am using maven to create build my program i have to change all paths to be relative.

i right now i am loading files like this.

File folder = new File("src/main/resources/levels/");
    File[] listOfFiles = folder.listFiles();

and like this.

BufferedReader br = new BufferedReader(new FileReader("src/main/resources/levels/"+fileName));

i know for advanced java programme this is primitive question but i am really strugging. Thanks for help.

so i want to load files like

FileReader("/levels/"+fileName));
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!