Skip to content
Sign upLog in
← Back to Community

How do I upgrade my java version?

Profile icon
plscodeinjava

Title says it all.... Can someone help me with this?

Answered by AbirHaque [earned 5 cycles]
View Answer
Voters
Profile icon
Maxwell102
Profile icon
FakeJonnW
Profile icon
abongsna168
Profile icon
AV3_08
Profile icon
memmojs
Profile icon
plscodeinjava
Comments
hotnewtop
Profile icon
AbirHaque

What you could do is the following:

  1. In your existing project, create a new file named ".replit"
    1
  2. Add the following in .replit:
    2

    The first line dictates the language you want to use. The second is a series of terminal commands you want done for you. The second line I have compiles all java files, then runs Main.java. You can change this as you please.
  3. Don't want to use Java 8? Change "java8" to "java10" or "java11".
    3

Hope this helps!

Profile icon
plscodeinjava

@AbirHaque

Still doesnt work:
image

Look at the bottom of the console

Profile icon
AbirHaque

@amaddentcsec
That's really odd. I'm going to look into this.

Profile icon
AbirHaque

@amaddentcsec
I tried playing around with the command line. Turns out you can't use that either, or else you get a "permission denied" message.

I know most users were moved to Java 11, but I see a few projects here on Repl.it still stuck on 1.8, so you might need to contact a mod to figure out what's up.

Alternatively, you could try forking this Java 11 repl, then copying and pasting your files into it: https://repl.it/@AbirHaque/Test#Main.java. Not exactly the most conventional way, and I really don't know if that would work, but please let me know if it does.

PS: I tried out your project on my end and it works great, so I'm now really curious about how to fix this issue.

Profile icon
MagicIceMoon

How to install java 16?

Profile icon
Coder100

You can suggest upgrading a language here

Profile icon
EpicGamer007

@Coder100
, he isn't asking to upgrade a language. He wants to change the version. It is not a language request. Explanation

Profile icon
Coder100

well it still fits in language requests/feedback.

@AbhayBhat

Profile icon
DynamicSquid

You can't. repl.it only has one version of java. you could always download a java compiler

edit: ok nvm don't listen to me

Profile icon
EpicGamer007

@DynamicSquid
, no, you see, repl has 2 versions of java for some reason.

See:

image

and:

image

To use my replit db manager for java, he needs to have java 11 which is the ubuntu version. His is the Java 8 version, mine is build 11.

Profile icon
DynamicSquid

@AbhayBhat
ah, I see

Profile icon
EpicGamer007

@amaddentcsec
, please don't call it a cycle special

Profile icon
SixBeeps

@AbhayBhat
I agree with this notion

Profile icon
EpicGamer007

@amaddentcsec
, just say at the bottom of the post, something like

I also made this for my 100 cycle special. enjoy!

Profile icon
DynamicSquid

@SixBeeps
yeah no one really cares about cycles anymore lol

Profile icon
EpicGamer007

@amaddentcsec
, i suggest asking a mod.

Profile icon
plscodeinjava

@AbhayBhat

Ok thanks :)

Profile icon
plscodeinjava

@AbhayBhat

Actually, how do i ask a mod? lol

Profile icon
EpicGamer007

@amaddentcsec
, try discord, if u do not have discord, i guess you can ping them maybe?...

Profile icon
plscodeinjava
Profile icon
EpicGamer007

@amaddentcsec
, try someone else. He is inactive now

Profile icon
plscodeinjava

@AbhayBhat

I dont know any mods :(

Profile icon
EpicGamer007

@amaddentcsec
,
@eekboi
, srry for pinging, but we need some help.

Edit: Wait, ur not a mod anymore noo.

Do you know anyone we can ping for this?

Profile icon
Bookie0

you can ping CodingCactus or CodeLongAndPros

@AbhayBhat

@amaddentcsec

Profile icon
plscodeinjava
Profile icon
[deleted]

@AbhayBhat
Being a mod doesn't mean that we know everything. Vice versa for not being a mod. I'm sure you can just go into the packager files.

Profile icon
plscodeinjava

@Bookie0
Thanks!

@codingcactus
@CodeLongAndPros

Can either of you two help me with this problem? Go to the top of the post to see explanation

Profile icon
Bookie0
Profile icon
plscodeinjava

@amaddentcsec

@Bookie0
@AbhayBhat
@AbirHaque
@DynamicSquid
@Coder100

GUESS WHAT??
I FOUND OUT HOW TO DO IT!!!
ALL I HAD TO DO WAS FORK
@AbhayBhat
's project and it worked!!!
Thanks for all the help everyone!

Profile icon
plscodeinjava

@AbhayBhat

Would you like to help me with my project? It would be nice to have some extra help with the database..

Profile icon
EpicGamer007

@amaddentcsec
, Thats Great! Im glad it was fixed up for you ;). About helping though... I am willing to help but I got a bunch of HW and online class. I guess you can invite me to the repl and when I have time I could check it out but I do not think I would be able to work for very long periods..

Profile icon
plscodeinjava

@AbhayBhat

That's fine, thanks... Any help is appreciated!

Profile icon
EpicGamer007

@amaddentcsec
, go ahead and invite me, i could check it out now.