Generate field depending on the deploying operating system

hope someone can provide me an advice how to manage this:
I have method working with files (compressing images and zips it into archive) - outcome file of this method need to be saved on a specific path. Ofc path is highly depends on operating system.

  1. Any way to check the operating system before creating base path string*
  2. As workaround i can check if it is production mode (production mode is always deployed on UNIX system other ways treat is as Windows). Any API for checking it?

Hello @baranukis

You can determine which OS is used now with the following code:

String os = System.getProperty("");


1 Like

Know that is more like general Java question but somehow i get stuck here.