code: def GetJavaInstallationPath():
  		
  		import os, platform
  
  		# Get JavaPath for Ubuntu
  		# if os.name == "posix":
  		if platform.system() == "Linux":
  			path = os.environ.get('JAVA_HOME')
  			if not path:
  				raise UcsValidationException(
  					"Please make sure JAVA is installed and variable JAVA_HOME is set properly.")
  			# raise Exception("Please make sure JAVA is installed and variable JAVA_HOME is set properly.")
  			else:
  				path = os.path.join(path, 'bin')
  				path = os.path.join(path, 'javaws')
  				if not os.path.exists(path):
  					raise UcsValidationException("javaws is not installed on System.")
  				# raise Exception("javaws is not installed on System.")
  				else:
  					return path
  
  		# Get JavaPath for Windows
  		# elif os.name == "nt":
  		elif platform.system() == "Windows" or platform.system() == "Microsoft":
  
  			path = os.environ.get('JAVA_HOME')
  
  			if path == None:
  				path = UcsUtils.CheckRegistryKey(r"SOFTWARE\\JavaSoft\\Java Runtime Environment\\")
  
  			if path == None:  # Check for 32 bit Java on 64 bit machine.
  				path = UcsUtils.CheckRegistryKey(r"SOFTWARE\\Wow6432Node\\JavaSoft\\Java Runtime Environment")
  
  			if not path:
  				raise UcsValidationException("Please make sure JAVA is installed.")
  			# raise Exception("Please make sure JAVA is installed.")
  			else:
  				path = os.path.join(path, 'bin')
  				path = os.path.join(path, 'javaws.exe')
  				if not os.path.exists(path):
  					raise UcsValidationException("javaws.exe is not installed on System.")
  				# raise Exception("javaws.exe is not installed on System.")
  				else:
  					return path
docs: Method returns the java installation path in the windows or Linux environment.