Krolyxon
Auto
Light
Dark
Summary
Tree
Log
Refs
Find
Commit
afbfce4
Branches
master
Refs →
dotfiles-x11
/
.local
/
bin
/
jrun
14 lines · 294 B · Bourne Again Shell (bash)
Raw
Blame
History
Download
1
#!/bin/env bash
2
3
# Script to run simple .java files.
4
# because its annoying to have .class files clutter your working directory;
5
6
if
[
-
z
$
*
]
;
then
7
echo
"usage: jrun <filename>"
8
else
9
filename
="${1%.*}"
10
\cp
-
f
"$1"
/tmp/
"$1"
11
javac
-
d /tmp
"$1"
12
java
-
cp /tmp
"$filename"
13
fi
14