Skip to main content

Posts

Showing posts from July, 2013

FileNotFoundException in Java

There are three  reason,for this java.io.FileNotFoundException to be thrown at run-time and the reasons are follows: Reason1:    "If the given file is not available in the specified location then this error will occur". As you see,this is the most obvious reason for this exception as indicated by the Exception itself. Example: import java.io.*; public class Example1{ public static void main(String[] args){ FileReader reader = new FileReader("c:/javaInterviewExam.txt"); BufferedReader br = new BufferedReader(reader); String strcontent =null; while ((strcontent = br.readLine()) != null){ System.out.println(strcontent); } br.close(); } } In the above code during the execution of the line BufferedReader br=new BufferedReader(reader); if the file exam.txt is not found in the given location then the following error message will appear. Error message: java.io.FileNotFoundException: c:\ javaInterviewExam .txt (The s...

Cannot complete the install because one or more required items could not be found.

Error While installing Maven in Eclipse Cannot complete the install because one or more required items could not be found.   Software being installed: m2e - Maven Integration for Eclipse 1.4.0.20130601-0317 (org.eclipse.m2e.feature. feature.group 1.4.0.20130601-0317)   Missing requirement: Maven POM XML Editor 1.4.0.20130601-0317 (org.eclipse.m2e.editor.xml 1.4.0.20130601-0317) requires 'bundle org.slf4j.api 1.6.2' but it could not be found   Cannot satisfy dependency:     From: Maven Integration for Eclipse (Editors) 1.4.0.20130601-0317 (org.eclipse.m2e.editor 1.4.0.20130601-0317)     To: bundle org.eclipse.m2e.editor.xml [1.4.0,1.5.0)   Cannot satisfy dependency:     From: m2e - Maven Integration for Eclipse 1.4.0.20130601-0317 (org.eclipse.m2e.feature. feature.group 1.4.0.20130601-0317)     To: org.eclipse.m2e.editor [1.4.0.20130601-0317] Solution : 1. Goto : Help -> Install New Software 2. Ad...