Skip to content

Compilation and execution script for any Java project directly from the terminal.

License

Notifications You must be signed in to change notification settings

Gabriel-c0Nsp/RunJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RunJava

Description

RunJava.sh is a shell script designed to simplify the process of compiling and executing Java projects directly from the terminal. It searches for Java source files or packages, compiles them if necessary, and executes the main Java class.

Get started

  1. Clone the repository:

    git clone https://github.com/Gabriel-c0Nsp/RunJava.git
  2. Navigate to the repository:

    cd RunJava
  3. Make sure the script has executable permissions. If not, run the following command:

    chmod +x RunJava.sh
  4. Since this script navigates through your directories, you need to run it using the source command:

    source ./RunJava.sh

Recommendations

You can easily run this script by simply just typing runjava (or whatever you want) in your terminal, by setting aliases to your .bashrc or .bash_profile.

First, you need to identify the current directory of the repository. This can be achieved with the following command:

pwd

This output is important for the following process. The output of the pwd command is personal and will be referred in this documentation as {current_directory} for generalization purposes.

Finally, you can add the following instructions to your .bashrc or .zshrc file:

export PATH=$PATH:{current_directory}/RunJava/
alias runjava='source {current_directory}/RunJava/RunJava.sh'

Don't forget to change the path in the export PATH=... command as needed.

Now you can try the runjava command anywhere in your terminal and check the result.

About

Compilation and execution script for any Java project directly from the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages