Article View: borland.public.jbuilder.java.language
Article #18065Runtime Class: get error 2?
From: Dr. Matt H. Stevens
Date: Fri, 14 Aug 1998 00:00
Date: Fri, 14 Aug 1998 00:00
22 lines
1299 bytes
1299 bytes
I am trying to write a method to do a file copy command on WindowsNT,
using the following code:
public static void copyAfile( String src_path, String dsn_path )
{
String copyCmd[] = {"copy",src_path,dsn_path };
Process copyProcess = null;
try {
copyProcess = Runtime.getRuntime().exec( copyCmd
);
if ( copyProcess == null ) {
System.out.println("copyAfile FAILED: "+src_path+" to
"+dsn_path);
}
}
catch ( Exception e ) {
System.out.println("Error Msg: "+e);
}
}
I get an Error No.2 when this executes, What is Error No.2 and How do I
find doc's on runtime errors? Thanks in Advance Matt
Technical Details
Message-ID:
<35D4A447.388F@mmm.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,f376e86e97fad06e,start X-Google-Attributes: gidf74b3,public From: "Dr. Matt H. Stevens" <mhstevens@mmm.com> Subject: Runtime Class: get error 2? Date: 1998/08/14 Message-ID: <35D4A447.388F@mmm.com> X-Deja-AN: 381233901 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: AeroSys Mime-Version: 1.0 Reply-To: mhstevens@mmm.com Newsgroups: borland.public.jbuilder.java.language