You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Processing项目启动报错:java.lang.NoClassDefFoundError: processing/core/PApplet

解决方案

核心问题

你的运行配置里把core.jar放到了模块路径(-p参数),但Processing的core.jar不是Java模块化JAR,JVM无法通过模块路径加载其中的类,导致找不到PApplet。

修复步骤

  1. 打开Eclipse的「运行配置」(Run Configurations)
  2. 找到MovingRectangle的运行配置,切换到「Arguments」标签页
  3. 删除VM参数里的-p "C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\core.jar"这一行
  4. 把core.jar的路径添加到Classpath参数中,修改后的Classpath应该是:
    C:\Users\user\eclipse-workspace\embodiedInteractionDance\bin;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\core.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\gluegen-rt.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\jogl-all.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\MidPose.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\gluegen-rt-natives-windows-amd64.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\jogl-all-natives-windows-amd64.jar;C:\Users\user\eclipse-workspace\embodiedInteractionDance\libs\jogl-all-noawt-2.2.4.jar
    
  5. 保存配置后重新运行

额外检查项

  • 确认core.jar文件完好:打开JAR文件,检查是否存在processing/core/PApplet.class
  • 重新添加构建路径:右键项目→Build Path→Add External Archives,重新选择core.jar
  • 清理重建项目:点击菜单栏「Project」→「Clean」,选择当前项目后执行清理,再重新编译运行

内容的提问来源于stack exchange,提问作者KMM

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 01:17:26