IllegalStateException: Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
Praticamente
String path = tastiera.next();
viene chiamato in un momento sbagliato, "No much result available" fa sembrare che tastiera.next non abbia nulla da ritornare.
Prova a leggere il file in altro modo, con un readLine di un BufferedReader.
sennò, invece di
tastiera.next();
prova ad usare
tastiera.nextLine();
![]()