Hi, let's say I have a program in my external hard drive and there's a code in my app that references a picture or a file in that hard drive, how do I make it so that when I take my external hard drive to another computer, even though the computer assigns a new drive to the hard drive, my code will still find the file/image?
You could search all the drives.
Use the File class's listRoots() method to get a list of root Files.
In a more structured environment, you could use environment variables to point the external drives or memory sticks. Set them on the new computer and your code can find the stuff it needs via the path in the variable.