Unity - no java runtime present requesting install - java

I used Unity Hub to install Android build tools. I can locate these files on my computer. I set JAVA_HOME and "java -version" command works fine. When I try to build I get following error: No Java runtime present, requesting install. what can I do?
Unity Version: 2019.4.9f1.
Mac OS Catalina
Errors

I downloaded and installed JDK manually and finally it worked

Related

I am trying to download android studio but it keeps telling me to install Java which i have done so. Please tell me what i should do?

I am trying to download android studio but it keeps telling me that i need to update or install Java, which i have done so afew times. But it keeps giving me the Java error message. I am running this on MacOS Mojave version 10.14.5. This is what the error keeps saying:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Make sure to install the latest JDK 12 from below link
https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
Configure the JVM and verify with command "java -version"
If above tasks has completed, retry the installation process.#naj
Set the JAVA_HOME Variable
Windows: configure java_home guide
Mac: configure java home guide
To verify whether you have install JAVA correctly or not in your machine. Do like below :
Open Command Prompt and Type : java -version
If it shows you the version then it all correct. But, if it does not recognize the command then you need to paste your jdk path in Environment variables. i.e : C:\Program Files\Java\jdk1.8.0_181\bin

Can't download JDK 8

I'm trying to setup Unity to build for Android. But I can't get the Java Development Kit. Can't download it and can't find it either.
In this answer, the guy says
To ensure JDK is installed, just go through the following :
press Win + R
type 'cmd' in the popup and press button OK.
in the console which has opened, type javac -version and press enter.
You should see as an output :
javac 1.8.0_XX
If so SDK is installed.
I did that and I got "javac 1.8.0_XX", and so I assumed I had the JDK, so I went to Unity > External Tools > JDK and tried linking the following path: "C:\Program Files\Java\jre1.8.0", and got the error message: "The path you specified does not look like a valid JDK installation. Android development requires at least JDK(1.7), having JRE only is not enough. Please make sure you are selecting a suitable JDK home directory or download and install the latest JDK: link"
I clicked the download link for windows x64 and it never loads and eventually says there's no connection. I tried the x86 as well.
In this SO question How do I find where JDK is installed on my windows machine?
Answer: For windows, in the command prompt:
c:\> for %i in (java.exe) do #echo. %~$PATH:i
And so I did that and got the path "C:\ProgramData\Oracle\Java\javapath\java.exe"
When I try linking via Unity > External tools > JDK it doesn't find any files.
I'm a bit clueless now.
#RealAnyOne, you have installed Java with JRE only installation i.e., without out a JDK that’s what you see only one folder and this is why it also showing version in the command line since it won’t check for JDK. JRE is Java Runtime Environment, JDK is Java Development Kit which contains many essential libraries. So Ideally there should be two folders JRE and JDK. This is the reason you are getting this issue with Unity.
To Fix::
Uninstall old Java 8
Download Java 8 from the oracle website
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Install it. Now you should have two folders. Then point your Unity to it.

Phonegap Build Error: Failed to run "javac -version", make sure that you have a JDK installed

running:
phonegap build android
with android SDK and Java SDK installed, I get the following error:
Error: Failed to run "javac -version", make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
I have tried adding the "java\jdk-9\bin" to environment variables, and PATH, etc. No luck!
My suspicion is that phonegap is trying to use the runtime version of Java as opposed to the SDK.
I had this problem and I solved it by uninstalling jdk-9 and installing JDK version 8.
Then set up the environment variables where needed (JAVA_HOME & add \bin to Path)
Maybe other users find this info useful. I'm windows user.
I spent so much time on this issue and realized that git-bash can't get it work and command prompt launch it without any issue! Many things i have did before switched to command prompt.
update to latest JDK8 Update
add \bin to Path.

Appcelerator Studio app not running in device

I am using titanium sdk version 5.0.2, I am trying to run the app on my android device, it throws the following error
[INFO] : Executing Alloy compile: cmd /s /c C:\Users\USER_NAME\.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\bin\alloy compile C:\Users\USER_NAME\Documents\Appcelerator_Studio_Workspace\ac (1)\Academic Communicators\app --config platform=android,version=0,simtype=none,devicefamily=none,deploytype=test,target=device --no-colors
'C:\Users\USER_NAME\.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\bin\alloy' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] Application Installer abnormal process termination. Process exit value was 1
Running ti build --platform android in terminal shows
Titanium Command-Line Interface, CLI version 5.0.4, Titanium SDK version 5.0.2.GA
Copyright (c) 2012-2015, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[ERROR] JDK (Java Development Kit) not found.
[ERROR] If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set.
[ERROR] The JDK can be downloaded and installed from http://appcelerator.com/jdk.
I tried replacing the alloy file in project, also set the JAVA_HOME environment variable to C:\Program Files (x86)\Java\jdk1.7.0_80\bin; ,nothing works! Help me finding the solution.
Thanks
Edit
javac version is javac 1.7.0_80 and
ti info shows jdk issue
Java Development Kit Issues
x JDK (Java Development Kit) not installed.
If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly
set.
The JDK is required for must be manually downloaded and installed from
http://appcelerator.com/jdk.
try to run ti info to see what is missing. Also check your PATH variable. You said you set JAVA_HOME so you should be able to run "javac --version" from a terminal. If that is not working please add the path to PATH.

jenkins install fail in suse,java>=1.6 is needed

the environment is:
suse linux enterprise server 11 x86_64
jenkins-1.563-1.2.noarch
I have manually download and installed jdk 1.6.0_45 64bit,command "java -version" succeed show the jdk version.
but when i try to install jenkins,it shows:
error failed dependencies:
java >=1.6 is needed by jenkins-1.563-1.2.noarch
anyone can help to resolve it?
You either have to install the java package which comes with Suse, or (if that's not available) install Jenkins manually.

Categories

Resources