Science, Tech, Math › Computer Science Reached End of File While Parsing This is a compile error, easily fixed Share Flipboard Email Print KIVILCIM PINAR / Getty Images Computer Science Java Programming PHP Programming Perl Python Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Paul Leahy Paul Leahy Computer Science Expert M.A., Advanced Information Systems, University of Glasgow Paul Leahy is a computer programmer with over a decade of experience working in the IT industry, as both an in-house and vendor-based developer. Learn about our Editorial Process Updated on January 28, 2019 The Java error message Reached End of File While Parsing results if a closing curly bracket for a block of code (e.g, method, class) is missing. The fix is easy — just proofread your code. Example In the code below, the method called main does not conclude with a closing curly bracket. The compiler cannot parse the code properly and will throw the error. public class Main {public static void main(String[] args) {System.out.println("Oops missed a curly bracket..");} Avoiding the Error Because this error is both common and easily avoided, using a code editor like Visual Studio Code or an integrated development environment like Eclipse. Code editors that feature linters and syntax checkers for Java (or whatever language you use) will uncover errors before you attempt to compile. Cite this Article Format mla apa chicago Your Citation Leahy, Paul. "Reached End of File While Parsing." ThoughtCo, Aug. 27, 2020, thoughtco.com/reached-end-of-file-while-parsing-2034285. Leahy, Paul. (2020, August 27). Reached End of File While Parsing. Retrieved from https://www.thoughtco.com/reached-end-of-file-while-parsing-2034285 Leahy, Paul. "Reached End of File While Parsing." ThoughtCo. https://www.thoughtco.com/reached-end-of-file-while-parsing-2034285 (accessed March 24, 2023). copy citation