Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 详细信息格式化程序错误:求值必须包含表达式或格式良好的语句块_Java_Eclipse_Text Files - Fatal编程技术网

Java 详细信息格式化程序错误:求值必须包含表达式或格式良好的语句块

Java 详细信息格式化程序错误:求值必须包含表达式或格式良好的语句块,java,eclipse,text-files,Java,Eclipse,Text Files,我在调试模式下遇到以下错误: 详细信息格式化程序错误: 计算必须包含表达式或格式良好的语句块 代码示例: try { content = new String(Files.readAllBytes(Paths.get(inputFile))); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Str

我在调试模式下遇到以下错误:

详细信息格式化程序错误: 计算必须包含表达式或格式良好的语句块

代码示例:

   try {
        content = new String(Files.readAllBytes(Paths.get(inputFile)));
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    String[] parts = content.split("."); //Here I get the above error
我做错什么了吗?

解决方案:

String[] parts = content.split("\\.");
奇怪的content.split(“.”)是有效的表达式。我不知道你为什么会犯这样的错误。你清理你的项目了吗?