JAVA_HOME找不到,无法构建

Build Failed: Error: Please make sure java is installed and JAVA_HOME is in your environment
at D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\native-utils.js:1:2762
at B (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\native-utils.js:1:2859)
at Object.build (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\native-utils.js:1:19170)
at D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\gulp-build.js:1:24016
at taskWrapper (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\node_modules\undertaker\lib\set-task.js:13:15)
at bound (domain.js:413:14)
at runBound (domain.js:426:12)
at asyncRunner (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\node_modules\async-done\index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:79:9)
at D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\lib\builder\index.js:1:3838
at wrapper (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\node_modules\async\dist\async.js:272:20)
at next (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\node_modules\async\dist\async.js:4584:24)
at D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\node_modules\async\dist\async.js:325:20
at D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\gulp-build.js:1:5860
at Gulp. (D:\Software\CocosDashboard\resources.editors\Creator\2.4.3\resources\app.asar\editor\core\gulp-build.js:1:26114)
at Object.onceWrapper (events.js:282:20)
at Gulp.emit (events.js:194:13)
at Gulp.EventEmitter.emit (domain.js:469:20)

有点蒙圈,知道的大佬指点下。。

应该是jre没安装

-0 -,看了看你的话,然后回头查了下路径。。。确实,我用的是不是JDK里的jre/bin

我是这么解决的
使用cocos creator 2.x 遇到的问题及解决办法!持续更新中
你试试看!