Repository: trafodion Updated Branches: refs/heads/master 8001c1549 -> 5b5ab328a
For debug in IDE,find jar by default Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/53d7f7af Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/53d7f7af Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/53d7f7af Branch: refs/heads/master Commit: 53d7f7affd802656186e02612bc62b149d8b664b Parents: 397fd2d Author: Kevin Xu <[email protected]> Authored: Wed May 23 11:37:33 2018 +0800 Committer: Kevin Xu <[email protected]> Committed: Wed May 23 11:37:33 2018 +0800 ---------------------------------------------------------------------- core/conn/trafci/install/Installer.java-tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/53d7f7af/core/conn/trafci/install/Installer.java-tmpl ---------------------------------------------------------------------- diff --git a/core/conn/trafci/install/Installer.java-tmpl b/core/conn/trafci/install/Installer.java-tmpl index d85e1fc..f781854 100644 --- a/core/conn/trafci/install/Installer.java-tmpl +++ b/core/conn/trafci/install/Installer.java-tmpl @@ -53,6 +53,7 @@ import java.io.PrintStream; import java.io.StringReader; import java.io.StringWriter; import java.net.URL; +import java.net.URISyntaxException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; @@ -3055,6 +3056,13 @@ void processCmdMode(String zipfile) int from = "jar:file:".length(); int to = urlStr.indexOf("!/"); + if(to == -1){ + try { + return new File(this.getClass().getResource("/").toURI()).getParent() + File.separator + "trafciInstaller.jar"; + } catch (URISyntaxException e) { + e.printStackTrace(); + } + } return urlStr.substring(from, to); } }
