Managing Runtime Versions in SAP Business Application Studio
2023-11-6 15:54:17 Author: blogs.sap.com(查看原文) 阅读量:5 收藏

As of the latest SAP Business Application Studio release, developers have the flexibility to install and select which runtime to use for their application development.

What does this mean?

By default, SAP Business Application Studio will install one Java and one Node.js version. (The default versions installed will be the LTS versions for Node.js and Java). These versions will be officially supported, meaning that all the tools that are installed by default in your dev space, should work out-of-the-box with these versions.
If you want to use the official versions, you can do that immediately, However, if you prefer to use other runtime versions, you’ll need to do a couple of steps, which I’ll explain in the next section.
The great advantage with this new capability, is that you can now select any version you want to use, and you’re not coupled to the versions delivered by SAP Business Application Studio. You can also install multiple versions per runtime type.

How to use different runtime versions?

There are 2 commands that can be used to install and select Node.js and Java runtime versions.

These are the steps required to install a runtime version:

  1. From the command palette, select “Runtime: Install”.
  2. Select Node.js or Java as the runtime you want to install.
  3. Select the runtime version you want to install.

The new version will be available on your dev space and persisted using your allocated storage. Installing the version does not change the default version used.

These are the steps required to set a default runtime version:

  1. From the command palette, select “Runtime: Set default”.
  2. Select Node.js or Java as the runtime.
  3. Select the runtime version to set as default.

Your selection will be persisted on your dev space and applies to all workspaces.

Note: We recommend that you do not install versions that have reached end of life.
Also, when you change the default version used in SAP Business Application Studio, you need to keep in mind that it is your responsibility to upgrade to the latest versions to receive the latest security fixes. These fixes are not installed automatically as they would with an official runtime version.

See Java (SAPMachine) and Node.js versions for more information.

How does it work?

To allow the installation and use of multiple runtime versions, SAP Business Application Studio uses asdf , which is a runtime version manager. You can use it also directly via the terminal, where you will be able to use more options (for example, installing versions that are not available via the install command). See the available asdf commands.

A few useful asdf commands that you should be familiar with:

  • To delete runtime versions that you don’t use, run the following command:
    asdf uninstall <java/nodejs> <version>
  • To check which versions are installed, run the following command:
    asdf list <java/nodejs>
  • To set the installed runtime version for the scope of a specific project, run the following command in the project’s root folder:
    asdf local <java/nodejs> <version>
    Check-in the created `.tool-versions` file within your project to your git source control. You can then collaborate with colleagues developing the same project, and all of you will be using the same runtime version.

I hope this blog was helpful, and that you like this addition to SAP Business Application Studio.

To get more information on SAP Business Application Studio, check out our documentation.

Looking forward to getting your feedback. Feel free to add your comments below or send us ideas

Happy coding  🙂


文章来源: https://blogs.sap.com/2023/11/06/managing-runtime-versions-in-sap-business-application-studio/
如有侵权请联系:admin#unsafe.sh