Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK Download Url Is 404 When Clicked In VsCode #618

Closed
rtpHarry opened this issue Jan 16, 2019 · 2 comments · Fixed by #619
Closed

JDK Download Url Is 404 When Clicked In VsCode #618

rtpHarry opened this issue Jan 16, 2019 · 2 comments · Fixed by #619
Labels

Comments

@rtpHarry
Copy link

Got this error message:

> cordova run android
[cordova]  Android Studio project detected
[cordova]  Failed to run "javac -version", make sure that you have a JDK installed.
[cordova]  You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
[cordova]
[ERROR] An error occurred while running subprocess cordova.

        cordova run android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Ctrl-clicking the link in vs-code opens up the url with the . on the end and is a 404 error.

Not sure if this is a vscode bug, but including the dot seems unnecessary and likely to trip up clients.

Raising it here for you to decide if it's an issue or not.

@brody4hire brody4hire added the bug label Jan 16, 2019
brody4hire pushed a commit to brody4hire/cordova-android that referenced this issue Jan 16, 2019
- updated download link, on its own line
- no punctuation at the end of the download link
  (fixes apache#618)
- no extra newline at the end
- extra newline spacing in case JAVA_HOME is invalid
@rtpHarry
Copy link
Author

Prompt fix! I'm still going through the process though and it seems that the url is wrong anyway.

After installing the JDK from that url, I get this now:

> cordova run android
[cordova]  Android Studio project detected
[cordova]  ANDROID_HOME=C:\Users\username\AppData\Local\Android\sdk
[cordova]  JAVA_HOME=C:\Program Files\java\jdk-11.0.2
[cordova]  Requirements check failed for JDK 1.8
[ERROR] An error occurred while running subprocess cordova.

My suspicion is that it is a bug that is failing to parse a double-digit version number now that its on v11, however that doesn't matter as the docs are clear:

https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#java-development-kit-jdk

They say that you have to install JDK v8.

The v8 download links are further down on the main download url but it's not intuitive that you should install an old version when the top download is an lts release.

A possible replacement link, that only includes the v8 downloads is:

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

brody4hire pushed a commit to brody4hire/cordova-android that referenced this issue Jan 16, 2019
- fix download link
- put download link on its own line
- no punctuation at the end of the download link
  (fixes apache#618)
- no extra newline at the end
- extra newline spacing in case JAVA_HOME is invalid
@brody4hire
Copy link

I raised PR #619 & #620 that should hopefully give the right link and JDK version. Feedback would be appreciated, I hope to get these in before we make the next major release for Cordova 9 (apache/cordova#10).

brody4hire pushed a commit that referenced this issue Jan 17, 2019
- fix download link
- put download link on its own line
- no punctuation at the end of the download link
  (fixes #618)
- no extra newline at the end
- extra newline spacing in case JAVA_HOME is invalid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants