File location to File(---) in java action

0
I have a file which I want to get as “new File(‘---’)” so in which folder shall I put the file and how would be the path to the file.
asked
1 answers
1

You can put files into your application’s resources folder.

Assuming you have a String called filename with the name of the file you want to read, this can be read from Java using the following…
 

File myFile = new File(Core.getConfiguration().getResourcesPath() + File.separator + filename);


You will need to also import com.mendx.core.Core to access the getConfiguration method.

I hope this helps. Good luck!

answered