Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to get OS specific information in Java?

  1. Specifically getting on Windows the "..\Documents & Settings\All Users, basicaly any path that needs the front end to be dynamically derived based on the OS your software is running on. (Now I need the answer to this)
  2. the current users My Documents dirctory (okay this has been answered) and basicaly any path that needs the front end to be dynamically derived based on the OS your software is running on.
like image 906
javelinBCD Avatar asked Dec 17 '22 10:12

javelinBCD


1 Answers

My docs would probably best be handled by accessing:

System.getProperty("user.home");

Look up the docs on System.getProperty.

like image 92
nimish Avatar answered Jan 06 '23 15:01

nimish