Victor Oliveira
Victor Oliveira

Reputation: 3713

Working with default path

Okay guys, I made one research and I found nothing to exemplify correctly that I did this and to not post this as someone lazy. My problem is:

I have one image on the rsc folder of my project. I can acess it from a full path name:

C:\Users\Victor\workspace\SHST\rsc\image.jpg

But, I need to move this folder in future to another desktop and 'course I can't change for every variable the Main path "C:\Users\Victor\workspace\". I tried to thing about environment variables but even though I swear I found nothing. I know there is a way to do this and it's not so hard as it's seems, that's why I can't realize I found nothing about it. Could anyone help me please?

Upvotes: 3

Views: 84

Answers (1)

SeniorJD
SeniorJD

Reputation: 7212

Put the image into C:\Users\Victor\workspace\SHST\res\ folder in your project and load the image file by call res/image.jpg. Than, anywhere you'll replace your project, it should being loaded.

Upvotes: 1

Related Questions