Welcome to JavaRanch,
It is not one or the other. It is a matter of degree. There is no end to learning. You can't take the time to learn everything or you would never get started.
So a better question might be "How much do you learn before you get started?"
AT the very minimum you are going to need to know how to load your
IDE of choice (assuming you use an IDE) and install the JDK.
One extreme, the one I lean towards, would be to jump in with both feet. I find it is much easier to learn a new computer language by writing code in that language. When I get stuck I go look at the tutorials or something. They say we learn best by our mistakes. So I make a lot of little mistakes.
print("hello world"); // doesn't work
println("hello world"); // still doesn't work.
cout.println("hello world"); // nope
<search tutorial>
System.out.println("Hello World!"); // success
That is three mistakes right there, I am learning fast.
But I may not be representative.
You might benefit from at least reading through the first of the Java Tutorials offered by Oracle. That would get you a feel for how to do some basic things quickly. It will also give you a flavor of what you can do with simple Java. It will set your expectations reasonably and wet your appetite for more. How many of those tutorials should you complete before you get started? Well, personally, I can't stand to do any of them. I would say read through them, and when you get antsy to try something you just saw, then jump in.
The other extreme is to try and learn as much as you can so you don't make mistakes, (or at least you know where to go to find the answers you need). I learn more about java all the time, even though I have already written much code. I think that is normal. What's more, I find that as I study other languages, I learn still more about Java because it shows me more clearly what Java does well, and what it doesn't. But of course you can't be bothered to learn every language before you start writing programs in your first language. That would be the other extreme from the one I chose. AS I said at the beginning, it is all a matter of degree.