• Post Reply Bookmark Topic Watch Topic
  • New Topic

compiling, how do you compile?  RSS feed

 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please explain compiling and how you compile
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basically, a compiler is just a translator.  It converts stuff from one language to another.  the Java compiler converts the java program you write into java bytecode - a language the java virtual machine understands.

at a basic level, you run the java compiler and pass it the name of your java file...so on a command line, you'd type something like this:

javac MyFile.java

and it would create a file named "MyFile.class".

Do you have more specific questions?

-edited to correct command name
 
Carey Brown
Saloon Keeper
Posts: 3317
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:java MyFile.java

Correction:
javac MyFile.java
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your time and answer.   danny
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle also has a good set of Java tutorials that explain exactly how it works from the beginning.

For example, the page About the Java Technology explains how Java works on a high level, and what the compiler does.

The Hello World example shows you how to write, compile and run your first Java program, with the exact commands you need to type in to make the compiler do its job.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the information on Oracle. That is  what I have been looking for. Thanks for your time.    danny
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!