#How to manage JDK version

1 messages · Page 1 of 1 (latest)

languid oasisBOT
#

This post has been reserved for your question.

Hey @daring oak! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

fleet burrow
#

I always wonder how can someone end up in a situation that it is bothersome. I understand it can be annoying that the version of Java currently used by a specific mechanism isn't on-screen at all times, which sometimes leads to the version not being the one expected and that is the non-obvious cause for an error

#

But, once you know that the version of Java needs to be not what it currently is, changing it and be done with it, I don't understand how do you end up somewhere that's a bother

daring oak
#

because only one can have the highest priority on JAVA_HOME and Path..?

#

obviously

#

and i don't particularly like managing those every time

stiff hornet
#

why do you want to switch jvm versions ? for compiling ?

daring oak
#

it's because different frameworks require different versions

#

sometimes it's 11, sometimes 17, some need 8 (kafka/hadoop)

#

and it's just a mess

#

with .NET they have it figured out and i don't need to fiddle with path every time i want to run something different

#

you just need the SDK installed and it uses the correct one

stiff hornet
daring oak
#

both

#

but it happens more with compiling

stiff hornet
#

for compiling you can use the most recent version of the jvm (for example 17) and compile with the --release flag.

daring oak
#

so mvn clean install --release 8?

stiff hornet
daring oak
#

well

#

i'm gonna state the obvious and say, I use gradle and maven build tools when compiling

#

i don't use javac directly

stiff hornet
#

yeah but it should be possible to specify compiler args for javac using maven

stiff hornet
languid oasisBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

languid oasisBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.