Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
不再打印二进制文件第一行,修复自动重启
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloento committed Jan 11, 2021
1 parent 1df401c commit c8b4b0f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/com/QYun/SuperSpineViewer/RuntimesLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ else if (skel.contains("2.1."))

private boolean binaryVersion(File skelFile) {
try {
String fistLine = new BufferedReader(new FileReader(skelFile)).readLine();
System.out.println(fistLine);

whichVersion(fistLine);
whichVersion(new BufferedReader(new FileReader(skelFile)).readLine());
if (spineVersion.get() < 20) {
System.out.println("Spine二进制版本判断失败");
return false;
Expand Down Expand Up @@ -139,8 +136,9 @@ public boolean init(File file) {
if (Controller.class.getResource("").getProtocol().equals("jar")) {
new Thread(() -> {
try {
Runtime.getRuntime().exec("java -jar "
+ System.getProperty("java.class.outPath")
Runtime.getRuntime().exec("cmd /k start "
+ "java -jar "
+ System.getProperty("java.class.path")
+ " " + openPath, null, new File(System.getProperty("user.dir")));
} catch (IOException ignored) {
}
Expand Down

0 comments on commit c8b4b0f

Please sign in to comment.