mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug where no java reg path found stack
This commit is contained in:
parent
b20e303932
commit
af009a96d9
@ -247,10 +247,19 @@ class ServerInstance:
|
|||||||
"Oracle Java detected. Changing start command to avoid re-exec."
|
"Oracle Java detected. Changing start command to avoid re-exec."
|
||||||
)
|
)
|
||||||
which_java_raw = self.helper.which_java()
|
which_java_raw = self.helper.which_java()
|
||||||
|
try:
|
||||||
java_path = which_java_raw + "\\bin\\java"
|
java_path = which_java_raw + "\\bin\\java"
|
||||||
|
except TypeError:
|
||||||
|
logger.warning(
|
||||||
|
"Could not find java in the registry even though"
|
||||||
|
" Oracle java is installed. Re-exec expected, but we have no"
|
||||||
|
" other options. CPU stats will not work for process."
|
||||||
|
)
|
||||||
|
java_path = ""
|
||||||
if str(which_java_raw) != str(self.helper.get_servers_root_dir) or str(
|
if str(which_java_raw) != str(self.helper.get_servers_root_dir) or str(
|
||||||
self.helper.get_servers_root_dir
|
self.helper.get_servers_root_dir
|
||||||
) in str(which_java_raw):
|
) in str(which_java_raw):
|
||||||
|
if java_path != "":
|
||||||
self.server_command[0] = java_path
|
self.server_command[0] = java_path
|
||||||
else:
|
else:
|
||||||
logger.critcal(
|
logger.critcal(
|
||||||
|
Loading…
Reference in New Issue
Block a user