Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bonita-studio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
bonita
bonita-studio
Commits
da675745
Commit
da675745
authored
Jul 11, 2017
by
Romain Bioteau
Committed by
Adrien
Jul 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(h2Console) fix jre detection (#606)
Closes BS-16823
parent
07d0f3c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
bundles/plugins/org.bonitasoft.studio.businessobject/src/org/bonitasoft/studio/businessobject/ui/handler/OpenH2ConsoleHandler.java
...tudio/businessobject/ui/handler/OpenH2ConsoleHandler.java
+5
-6
No files found.
bundles/plugins/org.bonitasoft.studio.businessobject/src/org/bonitasoft/studio/businessobject/ui/handler/OpenH2ConsoleHandler.java
View file @
da675745
...
...
@@ -39,6 +39,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import
org.eclipse.debug.core.ILaunchManager
;
import
org.eclipse.debug.ui.IDebugUIConstants
;
import
org.eclipse.e4.core.di.annotations.Execute
;
import
org.eclipse.jdt.internal.launching.StandardVMType
;
import
org.eclipse.jdt.launching.JavaRuntime
;
import
org.eclipse.jdt.launching.SocketUtil
;
...
...
@@ -72,14 +73,12 @@ public class OpenH2ConsoleHandler {
}
protected
String
javaBinaryLocation
()
throws
FileNotFoundException
{
final
String
binaryName
=
Platform
.
getOS
().
toLowerCase
().
contains
(
"win"
)
?
"java.exe"
:
"java"
;
final
Path
javaBinaryPath
=
Paths
.
get
(
JavaRuntime
.
getDefaultVMInstall
().
getInstallLocation
().
getAbsolutePath
(),
"bin"
,
binaryName
);
if
(!
javaBinaryPath
.
toFile
().
exists
())
{
File
javaBinaryPath
=
StandardVMType
.
findJavaExecutable
(
JavaRuntime
.
getDefaultVMInstall
().
getInstallLocation
());
if
(
javaBinaryPath
==
null
||
!
javaBinaryPath
.
exists
())
{
throw
new
FileNotFoundException
(
String
.
format
(
"Java binary not found at '%s'"
,
javaBinaryPath
.
toFile
().
getAbsolutePath
()));
String
.
format
(
"Java binary not found at '%s'"
,
javaBinaryPath
.
getAbsolutePath
()));
}
return
javaBinaryPath
.
toString
();
return
javaBinaryPath
.
getAbsolutePath
();
}
protected
ILaunchManager
getLaunchManager
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment