Can not pack android apk

This is the 1st time that I am trying to package an UE project from my Mac to an APK file for android. ( I was using unity3d and now I am a newbe in UE).

This cant be packaged and I got the log below. Can you help me ?

Also I would like to ask if in the same apk can be packed both for ARM and Intel executable like unity3d.

Thanks

)): ====25/6/2015 12:34:19 ??.??.====PERFORMING FINAL APK PACKAGE OPERATION================================================
MainFrameActions: Packaging (Android (PVRTC)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant… (note: it’s safe to ignore javac obsolete warnings)
MainFrameActions: Packaging (Android (PVRTC)): Error: JAVA_HOME is not defined correctly.
MainFrameActions: Packaging (Android (PVRTC)): We cannot execute /System/Library/Frameworks/JavaVM.framework/Home/bin/java
MainFrameActions: Packaging (Android (PVRTC)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (PVRTC)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (PVRTC)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: /bin/sh failed with args -c ‘“/Users/myuser/NVPACK/apache-ant-1.8.2/bin/ant” -quiet debug’
MainFrameActions: Packaging (Android (PVRTC)): Stacktrace: at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError (System.String WorkingDirectory, System.String Command, System.String Params, System.String OverrideDesc, Boolean bUseShellExecute) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at UnrealBuildTool.Android.UEDeployAndroid.MakeApk (System.String ProjectName, System.String ProjectDirectory, System.String OutputPath, System.String EngineDirectory, Boolean bForDistribution, System.String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy (System.String ProjectName, System.String ProjectDirectory, System.String ExecutablePath, System.String EngineDirectory, Boolean bForDistribution, System.String CookFlavor, Boolean bIsDataDeploy) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at AndroidPlatform.Package (AutomationTool.ProjectParams Params, DeploymentContext SC, Int32 WorkingCL) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at Project.Package (AutomationTool.ProjectParams Params, Int32 WorkingCL) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at BuildCookRun.ExecuteBuild () [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): at BuildCommand.Execute () [0x00000] in :0
MainFrameActions: Packaging (Android (PVRTC)): Program.Main: ERROR: ERROR: /bin/sh failed with args -c ‘“/Users/myuserNVPACK/apache-ant-1.8.2/bin/ant” -quiet debug’
MainFrameActions: Packaging (Android (PVRTC)): Program.Main: AutomationTool exiting with ExitCode=1
MainFrameActions: Packaging (Android (PVRTC)): Domain_ProcessExit
MainFrameActions: Packaging (Android (PVRTC)): RunUAT ERROR: AutomationTool was unable to run successfully.

Error: JAVA_HOME is not defined correctly

Your Java is not set up properly or not installed or you only have Java runtime where you need JDK

Thanks for the guidance its Solved. (i did a search in google and I find out how to fix it).