After installing NativeScript Im getting this error when trying to run the following command
ns doctor
C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin;
C:\Program Files\Common Files\Oracle\Java\javapath;
C:\Program Files\Python310\Scripts\;
C:\Program Files\Python310\;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
C:\WINDOWS\System32\OpenSSH\;
C:\Program Files (x86)\dotnet\;
C:\Program Files\Java\jdk-19\bin;
C:\Program Files\Git\cmd;C:\WINDOWS\system32>ns doctor
√ Getting environment information
TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.
There seem to be issues with your configuration.
√ Getting NativeScript components versions information...
√ Component nativescript has 8.4.0 version and is up to date.
√ Your ANDROID_HOME environment variable is set and points to correct directory.
√ Your adb from the Android SDK is correctly installed.
√ The Android SDK is installed.
√ A compatible Android SDK for compilation is found.
√ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
× Error executing command 'javac'. Make sure you have installed The Java Development Kit (JDK) and set JAVA_HOME environment variable.
You will not be able to build your projects for Android.
To be able to build for Android, verify that you have installed The Java Development Kit (JDK) and configured it according to system requirements as
described in https://docs.nativescript.org/environment-setup.html
× WARNING: The Java Development Kit (JDK) is not installed or is not configured properly.
You will not be able to work with the Android SDK and you might not be able
to perform some Android-related operations. To ensure that you can develop and
test your apps for Android, verify that you have installed the JDK as
described in http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html (for JDK 8).
Your environment is not configured properly and you will not be able to execute local builds.
Verify that your environment is configured according to the system requirements described at
https://docs.nativescript.org/environment-setup.html.
C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools;
C:\Program Files\Java\jdk-17.0.5\bin;
C:\ProgramData\chocolatey\bin;
C:\Program Files\nodejs\;
C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;
C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;
C:\Program Files (x86)\BrowserStackLocal\;
C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.3\bin;
C:\Program Files\MongoDB\Server\5.0\bin;
C:\Users\Admin\AppData\Local\Programs\mongosh\;
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\bin;
C:\Users\Admin\AppData\Roaming\npm
Also when I checked my Environment variables I can see this
```
C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin;
C:\Program Files\Common Files\Oracle\Java\javapath;
C:\Program Files\Python310\Scripts\;
C:\Program Files\Python310\;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
C:\WINDOWS\System32\OpenSSH\;
C:\Program Files (x86)\dotnet\;
**C:\Program Files\Java\jdk-19\bin;**
C:\Program Files\Git\cmd;
C:\Users\Admin\AppData\Local\Android\Sdk\platform-tools;
**C:\Program Files\Java\jdk-17.0.5\bin;**
C:\ProgramData\chocolatey\bin;
C:\Program Files\nodejs\;
C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;
C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;
C:\Program Files (x86)\BrowserStackLocal\;
C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.3\bin;
C:\Program Files\MongoDB\Server\5.0\bin;
C:\Users\Admin\AppData\Local\Programs\mongosh\;
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\bin;
C:\Users\Admin\AppData\Roaming\npm
Is the multiple jdks causing the issue, please guide me
Thanks in advance :)
I tried looking into the documentation marked as red in the command line error and also on google but nowhere it talks about multiple version issue
Related
I have installed Java directly in IntelliJ on my new laptop (Oracle openjdk-17) and it doesn't recognize javac.
I've seen this post but there is no javac.exe in C:\Program Files (x86)\Common Files\Oracle\Java\javapath, only java.exe, javaw.exe and javaws.exe. There is a javac.exe in C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2\jbr\bin but it doesn't work when I add it to the Path. Should I install an additional version of jdk.17 outside of IntelliJ to make it work?
(node:16112) UnhandledPromiseRejectionWarning: CordovaError: 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.
Your JAVA_HOME is invalid: C:\Program Files (x86)\Java\jre1.8.0_171
I checked my user environment variable and I have the variable JAVA_HOME and set to "C:\Program Files (x86)\Java\jre1.8.0_171"
I also have C:\Program Files (x86)\Java\jre1.8.0_171 appended to the user environment variable PATH.
make sure you have a JDK installed
This is the relevant part of this error message. Your JAVA_HOME points to a Java Runtime Environment (JRE), not to a Java Development Kit (JDK).
javac is the Java compilation command, which Cordova is attempting to execute in this case. However, javac is not shipped with the JRE as it is a development tool.
You need to download and install a JDK and set JAVA_HOME to point to it
I have downloaded the latest ADT Bundle 64 bit from http://developer.android.com/sdk/index.html#download.
I have 64 bit JDK 1.7 version and I have set the System variable in the Path
path - C:\Program Files\Java\jdk1.7.0_60\bin
JAVA_HOME - C:\Program Files\Java\jdk1.7.0_60
I have unzip the zip file. I have tried to run the SDKManager.exe but nothing happened.
The I tried to open
E:\adt-bundle-windows-x86_64-20140624\sdk\tools\android.bat in the command prompt.
and I have got the following error.
E:\adt-bundle-windows-x86_64-20140624\sdk\tools>android.bat
'"E:\ADT-BU~1\sdk\tools\lib\\find_java.exe" -s' is not recognized as an internal or external command,
operable program or batch file.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
I have a 64 bit JDK 1.6 which I am unable to uninstall from control panel for some reason. But this path is not there in Environmental Variables. From My eclipse I am able to run Java Programs which means by JDK is working. But know why this error is coming ?
Windows 7, eclipse Kepler; I have an existing application which I believe to be compiled with 32-bit java. In any event, it won't work with 64-bit, that failed first.
So I downloaded and installed 32-bit eclipse and 32-bit java, set the path variable to pick up the java bin directory first (64-bit java was installed in \Windows\System32, and I don't want to try to uninstall it from there). Rebooted several times; finally established that, on a command line, java -version gives the 32-bit version ins of the 64-bit.
So I can run eclipse and I can run Tomcat, no error. I have double-checked the tomcat settings under Sysdeo to ensure they point to the newly-installed 32-bit version of java.
However, when I run the web application, I get "specified DSN contains an architecture mismatch between the Driver and Application". From googling that message, I gather it means I have a 64-bit driver and a 32-bit application. So how do I reset things to use the 32-bit driver?
I noticed that a message on Tomcat startup: "The APR based Apache Tomcat Native library which allows optimal performance in production enviornments was not found on the java.library.path:", and then it gives the following in a one-line harder-to-read form:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
C:\Program Files\Java\jre7\bin
C:\Windows\Sun\Java\bin
C:\Windows\system32
C:\Windows
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/bin/client
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/bin
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/lib/i386
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\ThinkPad\Bluetooth Software\
C:\Program Files\ThinkPad\Bluetooth Software\syswow64
C:\Program Files\Broadcom\WHL\
C:\Program Files\Broadcom\WHL\syswow64
C:\Program Files\Broadcom\WHL\SysWow64\
C:\Program Files\Broadcom\WHL\SysWow64\syswow64
C:\Program Files (x86)\Common Files\Ulead Systems\MPEG
C:\Program Files\Common Files\Lenovo
C:\SWTOOLS\ReadyApps
C:\Program Files (x86)\Intel\Services\IPT\
C:\Program Files (x86)\Common Files\Lenovo
c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\
c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
C:\Program Files (x86)\Symantec\VIP Access Client\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files (x86)\nodejs\
C:\Program Files\Java\apache-ant-1.9.2\bin\
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\
c:\Program Files\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files (x86)\eclipse
So the first line indicates, perhaps, that another 64-bit version of java is STILL getting referenced, this time from "c:\program files\java\jre7\bin". But I can't find where that's set, or where to unset it from.
Keep in mind that I don't have a project involved yet. This is all to set up running tomcat from within eclipse using sysdeo, so I don't have "Project / Properties / Build Path". I have "Windows / Preferences / Build path"; I have made sure the 32-bit version is the default JRE and has its correct path, but the Preferences / Java / build path / classpath variables are either deprecated or don't refer to java runtime at all (there's one pointing to 32-bit), and the only user library is xerces, hardly relevant to all this.
Can anyone please help me out on the correct settings for making this work, or methods for figuring it out?
It turns out that altering the path variable is not enough -- I found both a 64-bit and a 32-bit install of Java under Windows / Control Panel / Uninstall a Program; I uninstalled the 64-bit version, and now the application starts correctly.
I want to install and run Android Studio on my Windows 8 Pro 64-bit.
I can install, but when I running the app, this error appears:
Failed to load JVM DLL C:\Program Files\Java\jdk1.7.0_25\jre. If you
already have a 64-bit JDK installed, define a JAVA_HOMEvariable in
Computer > System Properties > System Settings > Enviroment Variables.
I define a JAVA_HOME on system variable 3 times with this values:
First time:
C:\Program Files\Java\jdk1.7.0_25
Second time:
C:\Program Files\Java\jdk1.7.0_25 ; C:\Program Files\Java\jdk1.7.0_25\bin
And third time:
C:\Program Files\Java\jdk1.7.0_25 ; C:\Program Files\Java\jdk1.7.0_25\bin ; C:\Program Files\Java\jdk1.7.0_25\jre
But I have same problem in 3 states.
Go to system properties then Advanced system settings
Cick bellow Enviroment variables
in system variables click New and input variable name JAVA_HOME and variable value java path, (example: C:\Program Files\Java\jdk1.8.0)
run studio64.exe instead of studio.exe, had same problem and this worked for me
I am using Windows Pro 8 too, here is my JAVA_HOME setting:
JAVA_HOME=c:\Program Files\Java\jdk1.7.0_15
What I can suggest is the following:
If android-studio installed successfully and cannot launch it,
go to your user profile folder :
cd %USERPROFILE%
delete ".AndroidStudioPreview"
open a new command line terminal:
set JAVA_HOME
make sure that the path returned is set to the proper java jdk directory.
If this does not show anything this means that your environment variable is not available.
Then launch android studio out of the command line.
If the problem persists try to install a new jdk side by side and point to the new jdk with JAVA_HOME.
Make sure that the installation folder in
C:\Program Files
or
C:\Program Files(X86)
If its in Program Files directory set the environment variable as
C:\Program Files\jdk_name
else
C:\Program Files(X86)\jdk_name
Change your most recent JDK folder name to the version the application is looking for. Example:
Go to:
C:\Program Files\Java
and rename the folder with most recent JDK version from \jdk1.7.0_XX to \jdk1.7.0_25
Good Luck.
Define a environment variable JAVA_HOME pointing to the JDK location (without BIN folder), like this:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101;
(Set it in system and local variable)
After that, add
%JAVA_HOME%\bin
to PATH variable (both in system and local settings)
Be sure to point to JDK installation directory, not JRE directory.
Then restart your computer.
If you install android studio x64 you should have java sdk x64 installed if not you can install it and try again