So, just to make sure I understand: you want to write a compiled Java application and put it in /etc/apps so that it runs within Splunk Web?
No, you are correct: the Java SDK is really meant for external applications. See stefandagerman's answer for information about what Splunk Web apps are. There might be some way to do what you are thinking of (I don't know enough to rule it out completely), but it would be...unusual.
Splunk apps are not really code, they are collections of searches, dashboards, reports, scripts etc. that are grouped together in a directory.
I would suggest you peruse this
http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/Whatsinthismanual to learn how to go about creating them.
A good starting point: http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/AppIntro