Skip to content

Commit

Permalink
πŸ› add possible fix for #82
Browse files Browse the repository at this point in the history
  • Loading branch information
theapache64 committed Jan 8, 2022
1 parent 4301d84 commit 70a77a2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ class SplashViewModel @Inject constructor(
}

private fun checkJdk(onExist: () -> Unit) {
val isJdkExists = System.getenv("JAVA_HOME") != null
if (isJdkExists) {
try {
Runtime.getRuntime().exec("java -version");
// jdk exists, pass callback
onExist()
} else {
} catch (e: IOException) {
_syncFailedMsg.value = "Ohh no! It looks like you don't have JDK installed πŸ˜₯"
}
}
Expand Down

0 comments on commit 70a77a2

Please sign in to comment.