试图修复我编译的jar中的错误

时间:2018-02-14 08:40:20

标签: java

我编制了我的jar并获得了以下内容:

    java.io.FileNotFoundException: Employees\firstname lastname.txt (The system cannot find the path specified)
    Exception in thread "main" java.lang.NullPointerException
    at EmployeeList.createEmployees(EmployeeList.java:127)
    at EmployeesWindow.<init>(EmployeesWindow.java:64)
    at ScheduleBuilder.<init>(ScheduleBuilder.java:17)
    at Start.main(Start.java:7)

我的文件路径如下:

    File file = new File("Employees\\" + tempfirst + " " + templast + ".txt");

该文件夹位于此处,包含一堆员工文本文件:

    F:\Programming\Schedule Builder\Employees

如何解决这个问题,以免我收到此错误?

0 个答案:

没有答案