在eclipse中,我试图给出一个configuration.json文件的路径,但它并没有接受它。System.getProperty("user.dir") or
FileReader file = new FileReader("projectName\\configuration.json");
我一直在试图解决这个问题,但我发现在Controller.vehicle上切换是有问题的,因为它是一个浮动值。我试着把它转换成String,但是它的工作量很大,并且把它转换成一个整数,我担心它可能会失去一些精度。if(Controller.vehicle instanceof Boat) {
file = new File(System.getProperty("user.dir")+"/src= new File(System.getProperty</em