-1

I use mac and intellij and working on a java codebase where properties file have some properties like below:

ops.payment.root.properties.file=file:////w:/webapp-conf/conf/ops-payment_root.properties

The issues is since I am on mac I can't create a w: (w drive) so I am looking for a way to make it work. I tried creating the symlink using the ln -s command but it creates the symlink like Users/myuser/w:/ which is not working since the code is looking for w: and not Users/myuser/w:

Can someone please let me know if they have ever run into similar issue?

The obvious solution of updating the property file with the my local specific path will not work for long, because the whole codebase has many similar properties in many different properties file and if I update all of them, it will be a nightmare while committing and updating my code from git since there are other developers working on it.

Rishabh
  • 21
  • 2
  • 4

1 Answers1

0

You have to update the actual folder location. Two ways to get the folder path

  1. right click one the folder > get info > click and copy where and add your folder name
  2. open terminal > cd drag the folder > enter > pwd > copy the path

Then search and replace all the occurrences

Debopam
  • 3,198
  • 6
  • 41
  • 72
  • Properties files are *resources* and should go in your classpath as resources. They can be loaded via `getClass().getResourceAsStream("/x.properties");` That should then work irrespective of how it's deployed – g00se Aug 11 '21 at 17:29
  • @Debopam I dont want to update anything in the properties file otherwise while updating the codebase from git I may have to revert all the changes and I don't want to do that. – Rishabh Aug 11 '21 at 17:48