感谢您的关注,我在努力解决这个问题: 我在Intellij Idea中打包了一个带有外部库的JAR文件,但是当我试图启动它时,我看到错误:
The file "city-data.json" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
Exception in thread "Animation Thread" java.lang.NullPointerException
at processing.core.PApplet.join(PApplet.java:8950)
at de.fhpotsdam.unfolding.data.GeoJSONReader.loadData(Unknown Source)
at Map.setup(Map.java:45)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
但我在这个Jar中看到了这个文件 archive ! 当我从Intellij或Eclipse中获取项目时,一切正常。请帮忙,问题是什么。
如果有人告诉我,我将如何从命令行收集所有项目到Jar文件,我将非常感激。我试图在
等命令的帮助下完成它 jar cvfe MyJarName.jar MyMainClass *.class
但它也不起作用,命令行回答了很多错误,比如 this