Answer the question
In order to leave comments, you need to log in
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
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
Deadbyelpy is right. I recommend using an IDE like eclipse or netbeans.
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question