No one is sure.
1) Admiral Josephus Daniels imposed a ban on serving alchoholic drinks on Navy ships. Coffee became a very popular drink as a result, and was so named after the Admiral who imposed the ban (supposedly).
2)
A) Admiral Josephus “Joe” Daniels, Secretary of the Navy (1912-20)
B) a modification of java or jamoke for coffee