Code Monkey home page Code Monkey logo

Comments (12)

rat-moonshine avatar rat-moonshine commented on June 19, 2024

So a new feature entry is being added - Java Development. Currently this adds into this ordering, we can change this though:
image

Addition of the newer JDK 8 entry now looks like this, when the existing entry now pointed to download JDK 11:
image

Version number also added #39 .

The only problem that currently I'm seeing is download-ability. Currently, the mechanism to determine if Java installed (and adding a downloaded tick) works in following ways:

  1. Checks if already setup in Moonshine Settings (when running inside Moonshine)
  2. Check by the named directory under the MoonshineSDKs
  3. Check if the JAVA_HOME exists in system environment variable

Since I have JAVA_HOME added to environment variable it immediately marks both the JDK entries as downloaded (and need not any further action). This maybe Okay against the usual JDK entry, but for JDK8 user may requires to have it downloaded explicitly, for which we may avail some option like re-download (in case of Royale Nightly) or something.

Thoughts are welcome.

from moonshine-sdk-installer.

rat-moonshine avatar rat-moonshine commented on June 19, 2024

Currently, we don't have a version check mechanism for Java, and neither for any other SDK other than Flex. This may create problem when:

  • User already has JAVA_HOME set to v8.0
  • We wants to push v11.0
  • SDK Installer marked the JDK-entry is present based on the JAVA_HOME present
  • JDK v11.0 entry do not have a download button

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

Moonshine SDK Installer will need to check the Java version at least.

If there are Java directories in MoonshineSDKs, iterate through them and:

  • Assign the latest version >= 11.0 to the OpenJDK entry
  • Assign the latest version of Java 1.8 to the OpenJDK 8 entry
  • Ignore versions < 1.8

Then, check JAVA_HOME

  • if the version is > 11.0, then assign it to OpenJDK if it is not assigned already
  • if the version is 1.8, then assign it to OpenJDK 8 if it is not assigned already
  • if the version is < 1.8, then ignore it.

If OpenJDK or OpenJDK 8 does not have a matching JDK assigned, then they should be conidered uninstalled.

from moonshine-sdk-installer.

rat-moonshine avatar rat-moonshine commented on June 19, 2024

Some updates until now:

  • Moonshine now has two pointers to setup JDK-default (v11) and JDK v8
  • MSKDI updated to detect availability of the JDK versions based on the logic it has, and discussed recently
  • Both the JDK path/settings auto-setup by MSDKI codes if applicable
  • Based on the found Java-version MSDKI set the appropriate JDK path in Moonshine settings

This still in a starting stage of the development, problems may found, and needs more tests.

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

I did a quick test with the standard use case on macOS, and the Moonshine SDK Installer use cases look good. The Installer logic also worked.

Here is a test matrix based on the logic we discussed above. Let me know if there are any missing cases, or if some cases are not possible to test:

OS MoonshineSDKs Environnment OpenJDK OpenJDK 8 Test Results
macOS JDK 8 only N/A Missing Installed Confirmed
macOS JDK 6 only N/A Missing Installed
macOS Both JDK 8 and 11 N/A Installed Installed Confirmed
macOS JDK 11 only N/A Installed Missing Confirmed
macOS No JDK N/A Missing Missing Confirmed
Windows JDK 8 only Not Set Missing Installed Confirmed
Windows JDK 8 only JDK 6 Missing Installed (8) Confirmed
Windows JDK 8 only JDK 11 Installed Installed Confirmed
Windows JDK 11 only Not Set Installed Missing Confirmed
Windows JDK 11 only JDK 8 Installed Installed Confirmed
Windows JDK 11 only JDK 15 Installed (11) Missing Confirmed
Windows Both JDK 8 and 11 Any Installed Installed Confirmed
Windows Both JDK 8 and 11 Not Set Installed Installed Confirmed
Windows No JDK JDK 6 Missing Missing Confirmed
Windows No JDK JDK 15 Installed Missing Confirmed

I excluded the cases where different versions of the JDK appear in MoonshineSDKs, since this shouldn't happen without manual intervention from the user.

The logic was not working like I expected on the Moonshine side, but we'll discuss this in Moonshine-IDE/Moonshine-IDE#755

from moonshine-sdk-installer.

rat-moonshine avatar rat-moonshine commented on June 19, 2024

I have updated the above test-matrix with more entries I could think about, with some fixes.

However, I couldn't able to get a full tests on macOS since download problem of OpenJDK versions. While I tried to download v11 or v15 from https://adoptopenjdk.net/releases.html site, resulting tar.gz file always extracts a single file instead of a directory in my tests.

I see the resulting file has 'bin' folder inside it, if I right-click on the file and chose "Show Package Content". But extract-out those files on a directory and if try running on Terminal (i.e. java -version), macOS refused to run the executable.

For now, I leave the macOS tests at my side.

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

I noticed that the "Required for" list for OpenJDK 8 is: Java Development, Domino Support

I'd like to keep OpenJDK as the only requirement for Java Development, so that the user doesn't feel like they need to install both if they don't specifically need JDK 8.

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

In my macOS tests, I see that OpenJDK 8 now installs with this path:

~/Downloads/MoonshineSDKs/Java/openjdk-1.8.0/Contents/Home/bin/java

This causes the OpenJDK 8 check to fail, since it expects this path

~/Downloads/MoonshineSDKs/Java/openjdk-1.8.0/bin/java

The OpenJDK (11) install matches the second pattern above.

from moonshine-sdk-installer.

rat-moonshine avatar rat-moonshine commented on June 19, 2024

I have fixed the problem where JDK 11 was unzipping properly but JDK 8 - and the resulting JDK 8 directory left an .app file like structure.

Here is some notes on the fix, I see I did some weird handling for the JDK particularly where it involves looking into Contents/Home structure - https://github.com/prominic/Moonshine-SDK-Installer/blob/features/issue_38_jdk11/MoonshineSDKInstaller/src/components/HelperInstaller.mxml#L344. Until now it was triggering for the default-JDK only, once I added JDK8 into the condition it also starts downloading in an expected way.

I'd like to keep OpenJDK as the only requirement for Java Development, so that the user doesn't feel like they need to install both if they don't specifically need JDK 8.

I have removed JDK8 'Java Development' criteria.

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

I think this logic is working well. It should be fine to merge this, as long as it is not a problem if the Moonshine-IDE/Moonshine-IDE#755 changes are not merged yet - that issue needs more work.

from moonshine-sdk-installer.

piotrzarzycki21 avatar piotrzarzycki21 commented on June 19, 2024

I'm not sure why we have miss that during our review. This seems to be ready. Can we close it ?

from moonshine-sdk-installer.

JoelProminic avatar JoelProminic commented on June 19, 2024

Yeah, the MSDKI side of this seems fine, though there are some remaining issues on the Moonshine side (Moonshine-IDE/Moonshine-IDE#755).

from moonshine-sdk-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.