How do I update one of my java projects to JAVA17?

Question: Title.

Profile not needed.

First, go to your files and click the show hidden files button.

image



Then click on the replit.nix file.

image



Ensure you have pkgs.graalvm17-ce in your dependencies.

image



Click on the .replit file.

image



Ensure that your nix channel is the latest stable version, stable_22_11.

image



And you should have Java updated to 17.0.5!

2 Likes

Hey! I did as you say. When I ran java --version, it still outputs 11 ;(. Any solutions?

Do I need to run anything to get nix working?

Im trying to run a .jar file @java17

Hmmm. Running a java file with it printing the java version number seems to output to 11 too.

Is that not the version of Java that you wanted?

Are you using a polygott repl or a nix repl?

I think a link to your project would be very helpful.

Oh sorry, I meant it outputs 11.

https://replit.com/@PrintedWaste/Java-Test

That’s the link

I’m also using the Java repo

add ?migrateNonNix=1 to your repl’s URL

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.