Earlier quoted context omitted.
Java is great for exactly that reason. It gives students an introduction to compilation, runtimes, stacks and heaps etc. Perhaps you had a poor learning experience due to who/what was teaching you rather than Java? My second comp sci course in college (first if you count high school AP credits), taught me all of this, and prepared me for the "full details" of MIPS and C.
Learning C first would also introduce students to all of that as well, outside of the magic shell of Java and its tooling; get your compiler, get your text editor, and you are so much closer to the action. If I could have chosen what I started with I would likely have picked C, or possibly a LISP as well.
Thanks to C and C++ I did understand the most important bases of programming, how a program runs, how hardware works and the most important algorithms and data structures.
I think it's important to learn something that doesn't do too many abstraction but it isn't too low level like the assembly language.