Shortcuts for Terminal for running a Java Program

Sam

I wrote a java program first time on Linux.

This is where my program Test.java is located:

Desktop> APCS (folder)> Chapter5 (folder) > Test.java

I know that to compile I have to type javac Test.java and to run "java Test".

Before that, I have to type cd Desktop, cd APCS, cd Chapter5.

Is there any short way to navigate to Test.java?

huntertur

Two ways to shorten the time it takes to go down multiple directories:

  • You can go down multiple levels at a time, so you can type cd Desktop/APCS/Chapter5
  • Pressing TAB while typing a directory or file name will automatically complete the rest of the filename for you. So if you are in your home folder and need to cd to your desktop, you can type the first two or three letters of Desktop and press tab to automatically complete it

If you need to compile and run your program a lot, make a shell script on your desktop or somewhere else with:

javac ~/Desktop/APCS/Chapter5/Test.java
java ~/Desktop/APCS/Chapter5/Test

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Shortcuts for Terminal for running a Java Program

From Dev

Running java program from terminal

From Dev

Keep a program running in terminal

From Dev

Creating Desktop or terminal comands shortcuts to open a program

From Dev

Creating Desktop or terminal comands shortcuts to open a program

From Dev

NoClassDefFoundError while running a java program in terminal from IDE

From Dev

Pausing a long running program in the terminal?

From Dev

Running a startup program in terminal with sudo

From Dev

Running a startup program in terminal with sudo

From Dev

Block terminal input while running a terminal program

From Dev

Block terminal input while running a terminal program

From Dev

Running a Program in Terminal (C file) and Not Running to Completion

From Dev

Java thread program stops running with no error message (mac terminal/command prompt)

From Dev

Running a program from terminal, "command not found"

From Dev

Running a program from terminal, "command not found"

From Dev

Open already running program via terminal

From Dev

Modify running Java program

From Dev

Java Program Not Running

From Dev

Running java Program on Hadoop

From Dev

Running java program in windows

From Dev

Running Java Program in another Program gives error

From Dev

Running Java Program in another Program gives error

From Dev

Error: A JNI error has occurred, please check your installation and try again - during running Java program from Ubuntu terminal

From Dev

Running java program without ide

From Dev

Running a Java program without compiling

From Dev

Running Client Server program in java

From Dev

UnsupportedClassVersionError when running java program

From Dev

Why is my Java program not running?

From Dev

Command run in terminal, not with shortcuts

Related Related

  1. 1

    Shortcuts for Terminal for running a Java Program

  2. 2

    Running java program from terminal

  3. 3

    Keep a program running in terminal

  4. 4

    Creating Desktop or terminal comands shortcuts to open a program

  5. 5

    Creating Desktop or terminal comands shortcuts to open a program

  6. 6

    NoClassDefFoundError while running a java program in terminal from IDE

  7. 7

    Pausing a long running program in the terminal?

  8. 8

    Running a startup program in terminal with sudo

  9. 9

    Running a startup program in terminal with sudo

  10. 10

    Block terminal input while running a terminal program

  11. 11

    Block terminal input while running a terminal program

  12. 12

    Running a Program in Terminal (C file) and Not Running to Completion

  13. 13

    Java thread program stops running with no error message (mac terminal/command prompt)

  14. 14

    Running a program from terminal, "command not found"

  15. 15

    Running a program from terminal, "command not found"

  16. 16

    Open already running program via terminal

  17. 17

    Modify running Java program

  18. 18

    Java Program Not Running

  19. 19

    Running java Program on Hadoop

  20. 20

    Running java program in windows

  21. 21

    Running Java Program in another Program gives error

  22. 22

    Running Java Program in another Program gives error

  23. 23

    Error: A JNI error has occurred, please check your installation and try again - during running Java program from Ubuntu terminal

  24. 24

    Running java program without ide

  25. 25

    Running a Java program without compiling

  26. 26

    Running Client Server program in java

  27. 27

    UnsupportedClassVersionError when running java program

  28. 28

    Why is my Java program not running?

  29. 29

    Command run in terminal, not with shortcuts

HotTag

Archive