Hardware programming and Java are two worlds that don't go together very often. This is because Java is designed to be platform independent; hardware however is by definition different on every platform.
There are some things you can do in this area though. They are limited but they exist. So here are some questions you'll have to answer before we can recommend anything specific:
- Which OS are you using?
- What kind of hardware are you trying to access?
- Do you want to only read from the hardware or send it data too?
Generally speaking, Java ME is mostly just a reduced set of Java SE. It might give you some (very limited) control over the device you're using it on, I don't know. Java EE is a set of additional libraries for Java (though nothing hardware related as far as I know). So unless you want to program for mobile devices which support ME (which doesn't include most smartphones btw) you'll be using Java SE and maybe EE.