Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The constructor PrintWriter(BufferedWriter) is undefined

I am trying to create a report for which I am shown with a syntax error

"The constructor PrintWriter(BufferedWriter) is undefined".

for :

new PrintWriter(new BufferedWriter(new FileWriter(new File(OUT_FOLDER, "emailable-test-run-report.html"))));

I am using JDK 1.7

Can someone please guide me through this. Thanks!

like image 635
shikhar Avatar asked Feb 15 '23 05:02

shikhar


1 Answers

I had a similar issue - for clarity, you need the following lines at the top of your sketch:

import java.io.BufferedWriter;
import java.io.FileWriter;
like image 86
JeffThompson Avatar answered Feb 17 '23 07:02

JeffThompson