xdotool and an IDE (for example eclipse)
For X11 users.
Use this script and make sure you just 'Alt-tabbed'Alt+tab'ed from Eclipse. You need a java file. For example here: https://raw.githubusercontent.com/Valay/Longest-Word-Made-of-other-Words/master/LongestWord.java
#!/bin/sh
xdotool key alt+Tab
xdotool sleep 0.2
xdotool type --delay 300 "$(cat LongestWord.java)"
xdotool key alt+Tab