Skip to content
← Back to Community
Packages and .class files in Repl.it
Profile icon
asammoud

Hello all,
I have some .class files that are part of a package that I would like to use in my Java code on repl.it. How can I add .class files into repl and use them in my code.
P.S:
I tried to recreate the directory tree for my package in repl but the Java compiler seem to have issues with my .class location.
Error Message:
bad class file: ./package_create/Pack.class
class file has wrong version 54.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
1 error

Voters
Profile icon
jmort1021
Profile icon
CARLOSEDUARD251
Profile icon
Pinky512
Profile icon
RevolverBenny
Profile icon
asammoud
Comments
hotnewtop
Profile icon
pyelias

repl.it's Java version is a bit out of date. It is using Java 8, and you compiled your code with Java 10.You could use -target 8 to compile to the correct version.

(dont actually use java much, I might be wrong)