Why not just write it in Java first? Get yourself a working solution for your homework assignment, and then, in your own spare time, write your C version that goes deep under the hood to learn how the low level details all work?

Porting from C to Java isn't going to be a trivial task, and you are just creating more work for yourself which is not generally a good idea when under the pressure of a deadline (eg the assignment due date).

As for Java's line ending problem across different systems, all that matters for the purpose of the assignment, is that it works on the university's lab computers that they will be grading/testing your program on. Issues like that don't matter until there is actually a need to run it across the different systems. If the problem actually does occur on the university's computers, then talk to your professor about how to work around that.