cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the home directory "/usr/sap/ljs/ " in java

theanmozhi
Advisor
Advisor
0 Kudos

Hi Experts,

I have one Java application uploaded in HANA trail account.

here is my code.

File mydir = new File("C:\\test\\"); //Created this directory using mkdir()

String[] fileNames = mydir.list(); // threw exception java.lang.NullPointerException: while trying to get the length of a null array loaded from local variable 'fileNames' bec dir (c:test) is not the path as system looks for /usr/sap/ljs/C:\\test\\

can someone please advise how to get the temp dir+ mydir

Thanks

View Entire Topic
dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Theanmozhi,

Your chances of getting your question answered are greatly enhanced by using the correct tags.

This concerns a question about Java and the SAP Cloud Platform but the last one, and most important one, is missing.

It is not related to

For an update about product names, see