From 8f8ee94dc11d8ffb2a2d47a37a8893cbebfd4bc3 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 30 Jul 2004 00:27:39 +0000 Subject: [PATCH] Look for the appropriate java executable which is different on Vinders. --- .../threerings/getdown/data/Application.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/getdown/data/Application.java b/src/java/com/threerings/getdown/data/Application.java index 14db738..5f172c3 100644 --- a/src/java/com/threerings/getdown/data/Application.java +++ b/src/java/com/threerings/getdown/data/Application.java @@ -1,5 +1,5 @@ // -// $Id: Application.java,v 1.22 2004/07/29 21:23:04 mdb Exp $ +// $Id: Application.java,v 1.23 2004/07/30 00:27:39 mdb Exp $ package com.threerings.getdown.data; @@ -379,8 +379,20 @@ public class Application int idx = 0; // reconstruct the path to the JVM - args[idx++] = System.getProperty("java.home") + - File.separator + "bin" + File.separator + "java"; + String apbase = System.getProperty("java.home") + + File.separator + "bin" + File.separator; + String apath = apbase + "java"; + if (!new File(apath).exists()) { + apath = apbase + "javaw.exe"; + if (!new File(apath).exists()) { + apath = apbase + "java.exe"; + if (!new File(apath).exists()) { + Log.warning("Unable to find java! [jhome=" + apbase + "]."); + apath = apbase + "java"; + } + } + } + args[idx++] = apath; // add the classpath arguments args[idx++] = "-classpath";