我在尝试运行程序时收到错误Error: Could not find or load main class ExcelFileEditor
。我编译程序没有错误:
javac -cp C:\Users\rperera\IdeaProjects\LinkingNames\libs\*;. C:\Users\rperera\IdeaProjects\LinkingNames\src\ExcelFileEditor.java
我尝试过:
java ExcelFileEditor
java -cp C:\Users\rperera\IdeaProjects\LinkingNames\libs\* ExcelFileEditor
但我一直得到同样的错误。如果有人能帮助我解决这个问题,我真的很感激!
public static void main(String[] args) {
//this allows the Py4J module in Python to use whichever methods it needs from this class
ExcelFileEditor editor = new ExcelFileEditor(new File(args[0]));
GatewayServer server = new GatewayServer(editor);
server.start();
}
包是excel.writer
答案 0 :(得分:1)
如果您没有指定生成的类文件的放置位置,那么它将与源文件位于同一目录中。 试试
java -classpath C:\ Users \ rperera \ IdeaProjects \ LinkingNames \ libs \ *; C:\ Users \ rperera \ IdeaProjects \ Li nkingNames \ src excel.writer.ExcelFileEditor