I have the following package:
- project
- images
- 1.jpg
- audio
- 1.mid
- src
- main.java
- myClass.java
- images
This is the package folder hierarchy of my project. When using Eclipse, I can load the image 1.jpg by giving the relative path "images/1.jpg" or "./images/1.jpg". However, if I am to compile all the .java files in the src folder using the command "javac src/*.java" and run main, the program tells me that 1.jpg is not found. I have to change the path to image file in my code to "../images/1.jpg" for it to work. It therefore seems that in Eclipse, all the .java files think they are in the same folder as the "images" folder, which reduces a lot of work for me. How do I achieve the same without using Eclipse? (Using command line compilation)