尝试运行程序时出现错误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
最佳答案
如果您未指定将生成的类文件放置在何处,则它将与源文件位于同一目录中。
尝试
java -classpath C:\ Users \ rperera \ IdeaProjects \ LinkingNames \ libs \ *; C:\ Users \ rperera \ IdeaProjects \ LinkingNames \ src excel.writer.ExcelFileEditor