Article View: borland.public.jbuilder.java.language
Article #19646Re: Changing Directories?
From: Julio J Shinzato
Date: Thu, 08 Jan 1998 00:00
Date: Thu, 08 Jan 1998 00:00
64 lines
2536 bytes
2536 bytes
This is a multi-part message in MIME format.
--------------95DA9AE06EF5F48362E139DE
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
In terms of portability, it would be better if you use
the File class to reference files and directories instead of
use fileοΏ½s path and name.
Scott Couturier wrote:
>
> I know this is a pretty silly question but I'm having big trouble
> changing directories in Java. When I use the getProperties method it
> returns "file.seperator" as null. I am working at home in Win95
> developing an app for Solaris. Here is the code that is not working:
>
> String dir = p.getProperty("user.dir") + p.getProperty("file.seperator")
> + "Engr1201";
> p.put("user.dir", dir);
> System.setProperties(p);
> System.out.println("\n" + "New directory: " +
> p.getProperty("user.dir"));
>
> and it returns:
>
> New directory: c:\jbuilder\java\binNULLEngr1201
>
> Has anyone had this problem?
>
> Thanks in advance.
>
> Scott Couturier
> flam@cltonline.com
--
Julio Junki Shinzato
shinzato@inet.com.br
jjunki/RF06/SRF
--------------95DA9AE06EF5F48362E139DE
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Julio J Shinzato
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Julio J Shinzato
n: Shinzato;Julio J
org: Ministerio da Fazenda - Secretaria de Receita Federal
adr: R. Goias 151 - 6o. Andar - Ala A;;;Belo Horizonte;Minas Gerais;30.170-917;Brazil
email;internet: shinzato@inet.com.br
title: Tecnico do Tesouro Nacional - Informatica
tel;work: +55 031 218-6617
tel;fax: +55 031 222-5252
note: Lotus Notes: jjunki/SRF
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------95DA9AE06EF5F48362E139DE--
Technical Details
Message-ID:
<34B513B3.87508F8E@inet.com.br>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34437488.A242924@vnet.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,af6a9bfa308191d1,start X-Google-Attributes: gidf74b3,public From: Julio J Shinzato <shinzato@inet.com.br> Subject: Re: Changing Directories? Date: 1998/01/08 Message-ID: <34B513B3.87508F8E@inet.com.br> X-Deja-AN: 314009353 References: <34437488.A242924@vnet.net> Content-Type: multipart/mixed; boundary="------------95DA9AE06EF5F48362E139DE" Organization: Ministerio da Fazenda - Secretaria de Receita Federal Mime-Version: 1.0 Reply-To: shinzato@inet.com.br Newsgroups: borland.public.jbuilder.java.language