How To Compile Sources

Table of contents:

How To Compile Sources
How To Compile Sources

Video: How To Compile Sources

Video: How To Compile Sources
Video: Compiling Software from Source 2024, December
Anonim

A java program is a jar archive or a set of *.java and *.class sources if the compilation procedure has not yet been performed. Download and install Java Runtime Environment to compile java source code. You can also compile files in a developer environment such as JavaBeans.

How to compile sources
How to compile sources

Necessary

administrator rights

Instructions

Step 1

To download the latest Java Runtime Environment, open the java official website https://java.sun.com/javaee/sdk/. Find the Downloads section and download the program to your hard drive. Install the JRE on your computer's operating system - you need administrator rights to do this. Typically, such software should always be installed in the system directory of a local drive on a personal computer.

Step 2

Edit the system paths to the service folders by adding let to the files of the installed java machine. Enter the JRE installation directory into the path parameter - to do this, open "Computer Properties" - "Advanced" - "Environment Variables".

Step 3

Run the command line utility (you can find it through the main menu of the system, in the "Accessories" folder). Go to the directory path to the source folder and type the commands javac [main file name].javajava -cp [file name]. The main java program file is the file with the code of the main function main.

Step 4

To set custom options for compiling java files from the command line, type java -help and examine the information on the screen. Use the JavaBeans developer environment to automate the compilation process. The program has several compilation modes, including compilation step by step or from a specific breakpoint. In addition, the environment will tell you about errors at the stage of writing the program code.

Step 5

It is also worth noting that you can compile files using standard tools of software environments. For example, the Delphi application development environment allows you to first write visual code and apply all the forms of the program, and then compile all the content to get full-fledged software.

Recommended: