Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
WenchaoZeng committed Aug 9, 2023
1 parent 129876d commit badcaf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/main/java/com/zwc/sqldataprocessor/FileHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ public static String readFile(String path) {
}

public static void openFile(String path) {
String[] cmdarray;
String os = System.getProperty("os.name");
String cmd = "open " + path;
if (os.contains("Windows")) {
path = path.replace("/", "\\");
cmd = "explorer.exe " + path;
cmdarray = new String[] { "explorer.exe", path };
} else {
cmdarray = new String[] { "open", path };
}

try {
Runtime.getRuntime().exec(cmd);
Runtime.getRuntime().exec(cmdarray);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
Expand Down
4 changes: 2 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fullSqlPath="$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")"

oldPath=$(pwd)
currentDir=$(dirname $0)
cd $currentDir
cd "$currentDir"

java -Xmx16g -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=10 -cp "lib/*" com.zwc.sqldataprocessor.SqlDataProcessor "$fullSqlPath"

cd $oldPath
cd "$oldPath"

0 comments on commit badcaf6

Please sign in to comment.