Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

bundle the jvm with the installer via jpackage #248

Closed
gdoenlen opened this issue Jan 25, 2021 · 18 comments
Closed

bundle the jvm with the installer via jpackage #248

gdoenlen opened this issue Jan 25, 2021 · 18 comments

Comments

@gdoenlen
Copy link

If you're going to require a specific JVM (zulu) to be used by users you should be using jpackage to bundle said JVM into the installer.

@ashitsalesforce
Copy link
Contributor

Hi gdoenlen,

Thanks for pointing out jpackage tool. Data Loader requires a commercial/open source JRE 11 or later, not specifically OpenJDK 11. The installation/launch messages and documentation can be improved to state this requirement clearly.

@gdoenlen
Copy link
Author

gdoenlen commented Jan 26, 2021 via email

@ashitsalesforce
Copy link
Contributor

Hi gdoenlen,

Perhaps I am missing something but bundling the JVM would have the side-effect that a customer wanting to use their own org-specific JVM won't be able to do so.

@gdoenlen
Copy link
Author

side-effect that a customer wanting to use their own org-specific JVM won't be able to do so

I just never met anyone that ever wants to do this. 100% of the users I know don't want to have to configure a JVM for a desktop program.

Regardless these aren't mutually exclusive things, you can produce a build without it bundled and with it bundled so you can improve the UX for non-technical users like admins.

🤷‍♀️ Just a suggestion.

@Raptor399
Copy link

100% agree with @gdoenlen here. To illustrate why, an anecdote: I happen to have an ancient version of Java on my Mac, one that was too old to run Data Loader. So I tried installing the suggested ZuluJDK, which didn't work. So I installed OpenJDK and that worked. Next, I needed to change the startup script to use the correct JDK path.

Now I happen to be technical enough to understand what I'm trying to do here, but my colleagues have no clue what they're supposed to do. They just want to download Data Loader and have it run without a hitch.

Please consider releasing Data Loader as a self-contained Java application.

@pgumiela
Copy link

I fully agree with the comments from @gdoenlen and @Raptor399. Our customers also want to rely on the newest Data Loader but they expect the installation process to be as simple as possible. And because free dataloader.io is very limited when it comes to the number of records, we need to ensure that Data Loader is hassle-free :).

@29039
Copy link

29039 commented Dec 11, 2021

I agree with this. End users don't care what JRE is used, or what it even is, just so long as it works.

It is a bit risky sending users on a mission to download a JRE. They might find a fake one with malware. They won't keep it up to date to keep it secure.

The standalone version will be installed system wide and therefore a much greater attack surface for malware rather than living dormantly in a folder.

Any power user wanting a specific JRE for some strange reason I can't think of should be proficient enough to delete the included JRE and use their own.

It is also better for you, because the user environment will be more predictable for troubleshooting.

@pgumiela
Copy link

@ashitsalesforce, can we please revisit this suggestion?

@ashitsalesforce
Copy link
Contributor

Hi @pgumiela , point noted.

@ghost
Copy link

ghost commented Dec 30, 2021

For macOS please use at lest Java 17
Thanks

And this is actually pretty important since we do not install java anymore for security reasons.

@ashitsalesforce
Copy link
Contributor

Hi @MaxG-Enpal , you can use a JRE v11 or later including Java 17 for data loader. So, if the preinstalled JRE on your system is JRE 17, it should work with data loader.

@ghost
Copy link

ghost commented Dec 30, 2021

Hi @MaxG-Enpal , you can use a JRE v11 or later including Java 17 for data loader. So, if the preinstalled JRE on your system is JRE 17, it should work with data loader.

I mean if Salesforce is gonna add a prepackaged version it would be great if you would use Java 17 for macOS since it has wonderful M1 and Metal support that reduces the battery consumption.

@ashitsalesforce
Copy link
Contributor

Hi @MaxG-Enpal , that's a good point. Will keep it in mind when planning for a prepackaged version.

@pgumiela
Copy link

@ashitsalesforce, can we close the issue when it's really done? Because, otherwise, people will create other issues on the same topic because nobody knows Data Laoder's roadmap.

@ashitsalesforce
Copy link
Contributor

good point @pgumiela. Will reopen.

@rahulchaudharyofficial
Copy link

Just a thought - nix machines with sdkman & on windows machine with scoop, setup the dependencies with a script as pre-requisite.

@ashitsalesforce
Copy link
Contributor

ashitsalesforce commented Jul 24, 2023

Hi @rahulchaudharyofficial ,

Thanks for these suggestions.

Here is a bat script:

@echo off
CALL :installScoopAndJava
pause
EXIT /b %ERRORLEVEL%

:installScoopAndJava
    set JRE_NAME=temurin17-jre
    set "SCOOP_CMD_FILE=%UserProfile%\scoop\shims\scoop.ps1"
    if NOT EXIST %SCOOP_CMD_FILE% (
        Powershell.exe -executionpolicy remotesigned "irm get.scoop.sh | iex"
    )
    if NOT "%ERRORLEVEL%" == "0" (
        goto :exitWithJavaDownloadMessage
    )
    echo going to install 7zip
    CALL :execScoop install 7zip
    echo going to update 7zip
    CALL :execScoop update 7zip
    echo going to install git
    CALL :execScoop install git
    echo going to update git
    CALL :execScoop update git
    echo going to remove java bucket 
    CALL :execScoop bucket rm java
    echo going to add java bucket 
    CALL :execScoop bucket add java
    echo going to install java 
    CALL :execScoop install %JRE_NAME%
    echo going to update java
    CALL :execScoop update %JRE_NAME%
    echo installed JRE
    EXIT /b 0
    
:execScoop
    powershell.exe -noprofile -ex unrestricted -file "%SCOOP_CMD_FILE%" %*
    EXIT /b %ERRORLEVEL%

Here is a .command (or a .sh) script:

#!/bin/bash

installSdkmanAndJava() {
    source "$HOME/.sdkman/bin/sdkman-init.sh" >& /dev/null
    sdk version >& /dev/null
    if [ $? -eq 0 ]
    then
        sdk selfupdate force
    else
        curl -s "https://get.sdkman.io" | bash
    fi
    
    if [ $? -eq 0 ] # succeeded in installing sdkman
    then
        source "$HOME/.sdkman/bin/sdkman-init.sh"
        sdk install java
    fi
    
    if [ $? -ne 0 ] # did not successfully install sdkman or java
    then
        echo "Unable to install Java. Try manual installation."
        echo
    fi
}

installSdkmanAndJava

@ashitsalesforce
Copy link
Contributor

The script to download and install java on Windows can be downloaded from here.

The script to download and install java on Mac can be downloaded from here.

Linux users can download the script for Mac and change its extension from .command to .sh to use it.

@forcedotcom forcedotcom locked and limited conversation to collaborators Jul 31, 2023
@ashitsalesforce ashitsalesforce converted this issue into discussion #739 Jul 31, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants