I
I
Iron_Max2014-04-30 22:51:31
Java
Iron_Max, 2014-04-30 22:51:31

How to work with JVM?

Spoiler - This question may seem extremely stupid, but it took more than one hour to solve it, and on the Internet there are answers to more complex questions related to java.
The problem is this - I started learning the java language a few days ago, by the will of fate, the author of the book I am studying from did not indicate how to run written programs on my PC (in my case, on Windows 7). Having written the code of the "example.java" format, I can not budge, or rather understand how you can run some kind of legendary java virtual machine to demonstrate the work of my code. What should I do?
I would be very grateful for your attention and understanding (as well as a detailed story on how to run your first program).

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
Push Pull, 2014-04-30
@Iron_Max

javac yourclass.java Yourclass.class
file will appear in this folder. So the program is compiled. To run
java -classpath . your class is
here more

S
Semyon Semenych, 2014-05-01
@ExplosiveZ

Deadbyelpy is right. I recommend using an IDE like eclipse or netbeans.

S
Sergey, 2014-04-30
Protko @Fesor

www.skylit.com/javamethods/faqs/javaindos.html

D
DR_Demons, 2014-05-01
@DR_Demons

And here about the same

A
afiskon, 2014-05-06
@afiskon

Install Java 1.6 from Sun/Oracle. Not OpenJDK.
javac - compile
java -jar ... - run jar'nickname
Something like this.
With all sorts of IDEs, then get better at it. Otherwise, you will sit in the IDE all your life, not understanding how it actually works.

I
Iron_Max, 2014-05-07
@Iron_Max

Good advice, thank you)
PS - I tried the IDE and could not figure it out on the fly, so I decided to leave its study for later.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question