Sunday, October 3, 2010

CrazyEngineers Forum - Computer Science & IT Engineering

CrazyEngineers Forum - Computer Science & IT Engineering


hiii.. this is to all java programmers

Posted: 02 Oct 2010 11:47 PM PDT

Hi frnds, can any body tell me how i can change registry subkey settings using java.. or how i can add a mechanism to my application to close properly with cleanup(sort of) when system shut down or logout occurs.....:confused:
thanks in advance.

Ip address

Posted: 02 Oct 2010 07:35 PM PDT

what is the difference between physical Ip address and logical ip address please tell me any one .........................................

why this code does not execute

Posted: 02 Oct 2010 03:53 AM PDT

//java CopyFile aage.txt boxdemo.txt
import java.io.*;
class copyfile
{
public static void main(String args[])throws IOException
{
int i;
FileInputStream fin;
FileOutputStream fout;
try
{
fin=new FileInputStream(args[0]);
}
catch(FileNotFoundException e)
{
System.out.println("Input file not found");
return;
}
//open output file
try
{
fout=new FileOutputStream(args[1]);
}
catch(FileNotFoundException e)
{
System.out.println("Erroe opening output file");
return;
}
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Usage:copyfile from to");
return;
}
//copy file
try
{
do
{
i=fin.read();
if(i!=-1)
fout.write(i);
}
while(i!=-1);
}
catch(IOException e)
{
System.out.println("file error");
}
fis.close();
fout.close();
}
}

No comments:

Post a Comment