Permission denied while trying to compile and run Java workspace

runner
java

#1

I have three Java files in the workspace java-practice under the directory DeckOfCards. The files will compile correctly when I open a terminal window and use the javac command. But, I cannot figure out how to run the application. The main method is in the DisplayCards class. When I go to Run > Run with… > Java (workspace), I get the following. How do I run the application?

Running

Compiling all files in /
mkdir: cannot create directory ‘.bin’: Permission denied
find: ./nix/.cache': Permission denied find:./lost+found’: Permission denied
find: ./root': Permission denied find:./etc/ssl/private’: Permission denied
find: ./etc/couchdb/local.d': Permission denied find:./etc/polkit-1/localauthority’: Permission denied
find: ./var/lib/mysql': Permission denied find:./var/lib/php5’: Permission denied
find: ./var/lib/postgresql/9.3/main': Permission denied find:./var/lib/sudo’: Permission denied
find: ./var/lib/couchdb': Permission denied find:./var/lib/polkit-1’: Permission denied
find: ./var/log/mysql': Permission denied find:./var/log/apache2’: Permission denied
find: ./var/log/exim4': Permission denied find:./var/log/couchdb’: Permission denied
find: ./var/log/nginx': Permission denied find:./var/cache/ldconfig’: Permission denied
find: ./var/spool/exim4': Permission denied find:./var/spool/cron/crontabs’: Permission denied
find: ./var/spool/rsyslog': Permission denied find:./run/exim4’: Permission denied
find: ./proc/tty/driver': Permission denied find:./proc/1/task/1/fd’: Permission denied
find: ./proc/1/task/1/fdinfo': Permission denied find:./proc/1/task/1/ns’: Permission denied
find: ./proc/1/fd': Permission denied find:./proc/1/map_files’: Permission denied
find: ./proc/1/fdinfo': Permission denied find:./proc/1/ns’: Permission denied
find: ./proc/258/task/258/fd': Permission denied find:./proc/258/task/258/fdinfo’: Permission denied
find: ./proc/258/task/258/ns': Permission denied find:./proc/258/fd’: Permission denied
find: ./proc/258/map_files': Permission denied find:./proc/258/fdinfo’: Permission denied
find: `./proc/258/ns’: Permission denied
javac: invalid flag: usr/share/doc/libwerken.xpath-java/test/src/com/werken/xpath/test/Driver.java.gz
Usage: javac
use -help for a list of possible options
Error: Could not find or load main class

Process exited with code: 1


#2

You can run your application from your terminal, by using the following command after you have compiled all your code:

java <ClassWithMainMethod>