\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{minted}
\begin{document}
\thispagestyle{empty}

\inputminted{java}{Test.java}

\end{document}