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

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.
1 answers

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!