You've fallen into one of the evil traps of Strings. Never use == or != to compare two strings to see if they are the same (like you are doing on line 25 with ""). Always use .equals() instead - "Hello" might not refer to the exact same object as "Hello". Try the following, then search around this forum or on the internet; the problem with string equality comes up quite a bit.

Also not sure why you are setting lookfor to "\0"; Java doesn't require strings be null terminated.

And Welcome to the ranch!

Everything is theoretically impossible, until it is done. ~Robert A. Heinlein

For future reference, that part is irrelevant here, and is irrelevant for almost any question you might have about Java. (The only cases where it matters is where an IDE has its own compiler and that compiler behaves differently from the spec or from the JDK's compiler, which does happen but is rare.) It's basically like asking for help with a math problem and then mentioning that you're using a pencil to write down your work.

Good catch. That is quite right. In fact it should be very difficult to get a \0 into a Java String.

kar ja, why did you expect there to be a \0 in the String in the first place? They might exist in C/C++ but Java is a completely different language.
As well as Eclipse in the thread title being misleading, so is the use of the word null. You are not entering null Strings, but 0‑length Strings, which are very different.
Maybe you should write yourself a utility class. You can find examples here, here and here. There are others if you search. You will want a method different from anything you have seen there, namely public static String getStringFromKeyboard(String message, String errorMessage, int minimumLength). You can use that method to get keyboard input of a certain length, and you can use it again for your other applications.