Answer the question
In order to leave comments, you need to log in
How to run java ".class" files on ubuntu?
Hello, gentlemen, javaists)
I’m talking about Java right away, I know more by hearsay, I don’t write it myself - I just appeared to deposit a colleague’s code on the server so that I could test a little functionality today at night.
I have files of the form : .class and I understand that I need to compile them before running them.
In the presence of a server on ubuntu, installed jdk, jre
The structure is as follows:
-out
-src file
extension.iml
In the src folder com , Mainclass.class and javadriver.jar (it is for connecting to mongo)
I don’t quite understand what to do with this happiness now, but need to run.
I accept any constructive criticism, good advice and condescension) Do not judge strictly :))))
Answer the question
In order to leave comments, you need to log in
*.class is the sources already compiled into bytecode.
To start, enter the command in the terminal:
java -cp "путь/до/src/com;путь/до/javadriver.jar" Mainclass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question