Skip to content

Commit

Permalink
Corrected .jar-Execution
Browse files Browse the repository at this point in the history
Fixed Error "InputStream cannot be null" during
StaticHelpers.pareseLanguage()
  • Loading branch information
MonsterDruide1 committed Aug 23, 2019
1 parent abed606 commit 66b2cf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions MiBand4Editor/src/helpers/StaticHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ public static HashMap<String, String> parseLanguage(String name) {
}
}catch(FileNotFoundException e) {
try {
e.printStackTrace();
System.out.println("JAR-MODE");
InputStream is = MiBand4Editor.class.getClassLoader().getResourceAsStream("xml/"+name);
InputStream is = MiBand4Editor.class.getClassLoader().getResourceAsStream("src/xml/"+name);
Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is);
Element docEle = dom.getDocumentElement();
NodeList nl = docEle.getElementsByTagName("value");
Expand Down
2 changes: 1 addition & 1 deletion MiBand4Editor/src/main/MiBand4Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public MiBand4Editor() {
toolPath=new File("MiBandWFTool_1.3.8_Palette/");

if(!toolPath.exists()) {
JOptionPane.showMessageDialog(null, getInLang("select_toolPath"));
StaticHelpers.setWinLookAndFeel();
JFileChooser f = new JFileChooser();
JOptionPane.showMessageDialog(null, getInLang("select_toolPath"));
f = new JFileChooser();
f.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
f.setAcceptAllFileFilterUsed(false);
Expand Down

0 comments on commit 66b2cf5

Please sign in to comment.