Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Issue with compiling a project

$
0
0

Hi Friends,

I am getting back to cocos2d-x after almost half a decade. And having issue trying to compile a new JS project.

I have a fresh Ubuntu 18.04 box setup with Java 1.8, Cmake, and all other dependencies as mentioned @ https://docs.cocos.com/cocos2d-x/manual/en/installation/Linux.html

Now when I create and run new project with

cocos new -l js test
cd test
cocos run -p web

It works flawlessly.

But when I try to compile with
cocos compile -p web -m release
I am getting

Building mode: release
No valid JDK found

I tried adding

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export PATH=$JAVA_HOME:$PATH

and then

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre"
export PATH=$JAVA_HOME:$PATH

and then

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin"
export PATH=$JAVA_HOME:$PATH

With each of above settings, sourced .bashrc and tried running
cocos compile -p web -m release
only to get

Building mode: release
No valid JDK found

Any hint on what am I doing wrong? Highly appreciate any responses.

Thanks.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images