Prefer Process Builder
This commit is contained in:
parent
f21cf41455
commit
c70c052f53
1 changed files with 14 additions and 9 deletions
|
@ -57,15 +57,20 @@ public class Constants
|
||||||
//hides the BCV directory
|
//hides the BCV directory
|
||||||
if (isWindows() && !BCVDir.isHidden())
|
if (isWindows() && !BCVDir.isHidden())
|
||||||
{
|
{
|
||||||
try {
|
new Thread(()->{
|
||||||
BytecodeViewer.sm.pauseBlocking();
|
try {
|
||||||
// Hide file by running attrib system command (on Windows)
|
BytecodeViewer.sm.pauseBlocking();
|
||||||
Runtime.getRuntime().exec("attrib +H " + BCVDir.getAbsolutePath());
|
|
||||||
} catch (Exception e) {
|
// Hide file by running attrib system command (on Windows)
|
||||||
//ignore
|
Process p = new ProcessBuilder("attrib",
|
||||||
} finally {
|
"+H",
|
||||||
BytecodeViewer.sm.resumeBlocking();
|
BCVDir.getAbsolutePath()).start();
|
||||||
}
|
} catch (Exception e) {
|
||||||
|
//ignore
|
||||||
|
} finally {
|
||||||
|
BytecodeViewer.sm.resumeBlocking();
|
||||||
|
}
|
||||||
|
}, "Hide BCV Dir").start();
|
||||||
}
|
}
|
||||||
|
|
||||||
return BCVDir.getAbsolutePath();
|
return BCVDir.getAbsolutePath();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue