You can do it by creating (not throwing) a new Exception and inspecting its stack trace. Your class will be the zeroth element as it is the origin of the Exception. It kinda feels wrong, but it will work.
System.out.println( new Exception().getStackTrace()[0].getClassName() );
You can do the same with the Thread class. This seems cleaner to me, but the line is slightly longer. Your class is now the first element in the stacktrace rather than the zeroth. Thread.getStackTrace() is the zeroth.
System.out.println( Thread.currentThread().getStackTrace()[1].getClassName() );
For example, typing MyClass.class.getName() is no more useful than just "Myclass".
On the contrary, if you rename MyClass using your IDE's refactor function it will replace MyClass.class.getName() with RenamedClass.class.getName(). If you put a string in there you'll have to do it manually.