From 682c9964a54a05c95483df0bfee7d6416cfe9b97 Mon Sep 17 00:00:00 2001 From: "jason@long.name" Date: Tue, 21 May 2013 13:37:44 +0000 Subject: [PATCH] translation-tool: allow Test to work even if java not in path git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@672 d9718cc8-9f43-0410-858b-315f434eb58c --- src/micropolisj/util/TranslationTool.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/micropolisj/util/TranslationTool.java b/src/micropolisj/util/TranslationTool.java index ec26663..cf86d29 100644 --- a/src/micropolisj/util/TranslationTool.java +++ b/src/micropolisj/util/TranslationTool.java @@ -118,9 +118,13 @@ public class TranslationTool extends JFrame String selCountry = localeParts.length >= 2 ? localeParts[1] : ""; String selVariant = localeParts.length >= 3 ? localeParts[2] : ""; + File javaExe = new File(System.getProperty("java.home")); + javaExe = new File(javaExe, "bin"); + javaExe = new File(javaExe, "java"); + try { - String javaPath = "java"; + String javaPath = javaExe.toString(); String classPath = stringsModel.workingDirectory.toString() + System.getProperty("path.separator") + getMicropolisJarFile().toString();