Java Question Please Help

Argon

Baseband Member
Messages
55
Hey,

I have a problem with a Java app that I'm working on. I need to load a few images (.jpg) at runtime, and their paths cannot be hardcoded. I know java apps don't have a current directory, but is there a way to import the images into my project as resource files? Any help would be appreciated, thanks in advance.
 
If they are in the current java directory (the one the main file is in), just do a:

File f = new File(yourpic.jpg);

If you could elaborate on your situation, that would be good. :]
 
Back
Top Bottom