Skip to content

theedamn/Java-Batch-Program-Executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Java Batch Program Executor

This repository contains a simple batch program that simplifies the process of compiling and executing Java programs. Instead of typing multiple commands in the terminal, this program provides a convenient way to compile and execute Java files with just one click.

Prerequisites

Before using this program, ensure that you have the following software installed on your system:

  • Java Development Kit (JDK): Required to compile and run Java programs.
  • Operating System: This batch program is designed to work on Windows operating systems.

Usage

  1. To use the Java Batch Program Executor, follow these steps:
git clone https://github.com/theedamn/Java-Batch-Program-Executor.git
  1. Open the terminal and navigate to the cloned repository:
cd java-batch-program-executor
  1. Place your Java source code file (filename.java) in the same directory.

  2. Double-click on the JavaBatchProgramExecutor.bat file to execute it.

  3. The program will display a menu with options:

  • 1.list out the files in this directory
  • 2.Compile Java and interpret Java File
  • 3.view java file
  • 4.Exit the program
  1. Choose the desired option by entering the corresponding number and pressing Enter.

  2. If you choose option 1, the program will list out all the files in the current directory.

  3. If you choose option 2, the program will prompt you to enter the name of the Java file you want to compile and interpret. It will compile the Java source code and display any compilation errors, if applicable. If the compilation is successful, it will interpret and run the Java program.

  4. If you choose option 3, the program will prompt you to enter the name of the Java file you want to view. It will display the contents of the Java file on the console.

  5. If you choose option 4, the program will exit.

Example

  1. Suppose you have two Java source code files named HelloWorld.java and Calculator.java in the same directory as the batch program.

  2. Double-click on JavaBatchProgramExecutor.bat.

  3. Choose option 1 to list out the files in the current directory. The program will display the filenames: HelloWorld.java and Calculator.java.

  4. Choose option 2 and enter HelloWorld.java to compile and interpret the Java file. If there are no compilation errors, proceed to the next step.

  5. The program will run the HelloWorld Java program and display the output: "Hello, World!".

  6. You can repeat this process with different Java files by choosing the appropriate options from the menu.

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Acknowledgements

This program was developed to simplify the process of compiling and executing Java programs. It can be a useful tool for beginners learning Java or anyone who wants a convenient way to run Java programs without typing multiple commands in the terminal.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published