Excuse me for the sloppy code, it is just a test project and I've been working on this bug for at least a week now
public static void main(String[] args){
// TODO Auto-generated method stub
List<Report> report = new ArrayList<Report>();
Report test = new Report();
File file = new File("testByte.txt");
Scanner inputFile;
try {
inputFile = new Scanner(new File("port.txt"));
while(inputFile.hasNext())
{
test.LoadFromFile(inputFile);
report.add(test);
}
inputFile.close();
PdfMaker pdf = new PdfMaker(report);
try {
pdf.createLog();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try
{
boolean check = true;
FileOutputStream output = new FileOutputStream(file);
for(int i = 0; i < report.size(); i++)
{
report.get(i).WriteToFile(output, check);
check = false;
}
}catch(IOException e)
{
e.printStackTrace();
}
}
}
I get the file not found error on the line
FileNotFoundException(Throwable).(String) line: 264
inputFile = new Scanner(new File("port.txt");
I've checked the properties of the file and everything checks out to be okay
It is located in the appropriate folder
The source path does have the workbench folder as a path.
If anyone could point me in the direction to fix this problem, it would be very helpful since I've wasted hours searching for the internet.
*I bet it is something easy and I'm just to blind to see it