Hi try to surronund this peace of code with a try - catch block. like this
package e; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; public class Main { public static void main(String[] args) { FileInputStream f1 = null; try { Properties p1 = new Properties(System.getProperties()); f1 = new FileInputStream(p1.getProperty("myfile.txt")); } catch (FileNotFoundException ex) { System.out.println("Oops"); } finally { try { f1.close(); } catch (IOException ex) { } } } } Take care, Nik 2009/1/24, Tamilselvi Abbuekambaram <pranavfam...@yahoo.com>: > > Hi, > I am very new to java programming. > I am writing a simple java program ing NetBeans IDE 6.5. I am trying to > create an object of FileInputStream class but keep getting FileNotFound > Exception. I have attached the screen shot below. Any help is appreciated. > > Thanks in advance for your help > > > > -- С уважением, Николай. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---