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
?
Two ways to shorten the time it takes to go down multiple directories:
cd Desktop/APCS/Chapter5
cd
to your desktop, you can type the first two or three letters of Desktop and press tab to automatically complete itIf 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.
Comments