Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 98398 invoked from network); 10 Feb 2003 23:22:28 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 10 Feb 2003 23:22:28 -0000 Received: (qmail 14832 invoked by uid 97); 10 Feb 2003 23:24:04 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 14825 invoked from network); 10 Feb 2003 23:24:04 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 10 Feb 2003 23:24:04 -0000 Received: (qmail 96959 invoked by uid 500); 10 Feb 2003 23:22:14 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 96948 invoked from network); 10 Feb 2003 23:22:13 -0000 Received: from ns1.syntegra.com (150.143.16.2) by daedalus.apache.org with SMTP; 10 Feb 2003 23:22:13 -0000 Received: from [129.179.161.11] by ns1.syntegra.com with ESMTP for tomcat-user@jakarta.apache.org; Mon, 10 Feb 2003 23:22:20 Z Received: from ns1.syntegra.com by cdsms.cdc.com with ESMTP for tomcat-user@jakarta.apache.org; Mon, 10 Feb 2003 17:22:19 -0600 Received: from cis-exchange.jedi.local by ns1.syntegra.com with ESMTP for tomcat-user@jakarta.apache.org; Mon, 10 Feb 2003 23:22:18 Z Received: from us613005.ah.us.intra.syntegra.com ([129.179.77.171] unverified) by cis-exchange.jedi.local with Microsoft SMTPSVC(5.0.2195.5329); Mon, 10 Feb 2003 17:22:18 -0600 Date: Mon, 10 Feb 2003 17:22:18 -0600 From: Jacob Kjome X-Mailer: The Bat! (v1.54/10) Personal Reply-To: Jacob Kjome Organization: Springfield Nuclear Plant X-Priority: 3 (Normal) Message-Id: <7923483868.20030210172218@visi.com> To: "Tomcat Users List" Subject: Re: how can I make my Java code write to a file using relative paths In-Reply-To: <20030210214106.1101.qmail@web41315.mail.yahoo.com> References: <20030210214106.1101.qmail@web41315.mail.yahoo.com> X-OriginalArrivalTime: 10 Feb 2003 23:22:18.0837 (UTC) FILETIME=[4158E850:01C2D15B] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello runu, I'm guessing you are running your app as an NT Service, right? The base directory of the JVM becomes that from where it was started. In the case of a service, that is C:\WINNT\System32. If you started Tomcat from the .bat file which existed in CATALINA_HOME/bin, then that is where the base directory would exist for your relative paths. Jake Monday, February 10, 2003, 3:41:06 PM, you wrote: rr> Hi all, rr> I am using the following statement in my .java file rr> out = new FileOutputStream("responses.txt", true); rr> I assumed that it should write in a file in the same rr> directory as the .java file in web-inf/classes rr> but instead it writes in C:\WINNT\system32 rr> How can I get it to write at a particular place using rr> relative paths. rr> I shall appreciate any help. rr> Thanks, rr> Runu rr> __________________________________________________ rr> Do you Yahoo!? rr> Yahoo! Mail Plus - Powerful. Affordable. Sign up now. rr> http://mailplus.yahoo.com rr> --------------------------------------------------------------------- rr> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org rr> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org -- Best regards, Jacob mailto:hoju@visi.com --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org