Skip to content
Sign upLog in
← Back to Community

How to import packages in java

Profile icon
[deleted]

I want to import com.google.gson.GsonBuilder into a java file of mine, however, rep.it does have that file. Is there a way to make that package, then import it into my own code

Answered by TheDrone7 [earned 5 cycles]
View Answer
Voters
Profile icon
PratikBhowmik1
Profile icon
piperchester
Profile icon
richkezia
Profile icon
programom
Profile icon
jurgenvinju
Comments
hotnewtop
Profile icon
TheDrone7

For that you would need to use build tools such as maven or Gradle. Unfortunately, repl.it doesn't support any of them yet. Hopefully, they might add them in the near future. But till then you won't be able to do it.

Profile icon
SPQR

@TheDrone7
He might be able to do it using polygott

Profile icon
TheDrone7

@SPQR
no polygott doesn't have them either.

Profile icon
amasad

This is implemented now: https://blog.repl.it/maven

Profile icon
sayyidyofa

Repl.it supports adding libaries from maven/gradle now. Awesome!

Profile icon
TH3UNK0W

@sayyidyofa
How do I do this?