Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 47582 invoked from network); 28 Nov 2003 16:30:22 -0000 Received: from unknown (HELO smtp-ft4.fr.colt.net) (213.41.78.203) by daedalus.apache.org with SMTP; 28 Nov 2003 16:30:22 -0000 Received: from vma (host.245.109.41.213.rev.coltfrance.com [213.41.109.245]) by smtp-ft4.fr.colt.net with ESMTP id hASGUNu24467 for ; Fri, 28 Nov 2003 17:30:23 +0100 From: "Vincent Massol" To: "'Cactus Users List'" Subject: RE: "You must either set location or path on " Exception Message Date: Fri, 28 Nov 2003 17:30:06 +0100 Message-ID: <00ec01c3b5cc$e2b71130$2502a8c0@vma> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <3FC7676C.5090308@gmx.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Christopher Lenz [mailto:cmlenz@gmx.de] > Sent: 28 November 2003 16:19 > To: Cactus Users List > Subject: Re: "You must either set location or path on " > Exception Message > > Vincent Massol wrote: > > Hi Simon, > > > > Here's the code used by the task to find the tools.jar file: > > > > protected final File getToolsJar() > > throws FileNotFoundException > > { > > String javaHome = System.getProperty("java.home"); > > // TODO: Fix this as it fails on Max OSX (which doesn't have a > > // tools.jar file). > > File toolsJar = new File(javaHome + "/../lib/tools.jar"); > > if (!toolsJar.isFile()) > > { > > throw new FileNotFoundException(toolsJar.getAbsolutePath()); > > } > > return toolsJar; > > } > > > > So it means it cannot find it in [javahome]/../lib/tools.jar > > > > Do you know where it is for you (i.e. what directory)? > > Hmm, does this mean that this works for you in Eclipse? > > Obviously this code is quite broken, and was just one of those quick and > dirty hacks none of us ever produces ourselves ;-) I think that tools.jar > (or whatever classpath entry contains the Java compiler) should normally > always be on the Ant classpath. So some type of lookup to find the > resource > that contains the compiler should do the trick. I'll need to look into the > etc, to see how the Ant folks get the compiler on the classpath of > a > forked VM. Ok cool. I agree. One of the problem with eclipse when you use Ant from within Eclipse is that Eclipse automatically creates a JRE setup (and not a JDK one) and thus the tools.jar is missing. But I agree that once the JVM is correctly setup, we should be transparent. What we could do maybe is simply try to load some class from tools.jar to see if it's on the cp somewhere? Thanks -Vincent > > -chris > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: cactus-user-help@jakarta.apache.org