DEV Community

sugiarto
sugiarto

Posted on

2

Override java version on flutter

Today, I have a requirement to override the Java version on the Flutter project.

I used sdkman for switching between multiple Java versions, and in this case I used java 17.0.12. For the Flutter version, I used fvm and used flutter 3.24.0 on this project.

Here is the command to set java version:

fvm flutter config --jdkdir=/Users/sugiarto/.sdkman/candidates/java/current
Enter fullscreen mode Exit fullscreen mode

Where jdkdir should point to your absolute path of the Java directory.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs