One of the best things of JME is the fact that it's just a Java flavor like any other.
And that means it's easy to port code from e.g. JSE to JME. To prove this I ported the
jCIFS smb networking library to CLDC1.1/MIDP2.0. (Well just the stuff that is needed to access a smb share.)
It's far from complete but it works (at least on an emulator - never tried it on a real device).
Porting was easy. I just loaded the sources into my IDE (NetBeans) and looked at all those missing classes. (All those java.* classes).
I started to implement one by one of them until I reached a minimal level of completeness.
Then I moved all those classes to another package. (Since java.* isn't a good idea … )
That's it.
The result isn't very useable. It's missing a lot of things. But it's a start if you have a need for something like this.
Here are some of the many problems which still exist in the code:
- name resolution isn't working so your SMB urls have to look like "smb://<IP>/path"
- user and password is hardcoded in xjava.util.Properties so change them or store it in rms
- the SMB path is hardcoded in de.mobilej.SMBStore so change it or store it in rms
- the file views are only refreshed after changing the current directory (should be easy to fix)
- the progressbar doesn't seem to work
- some actions (e.g. rename) are not implemented
- since it's not signed you have to answer a lot of security popups
- ...
It's based on jCifs 1.1.11 and (so) it's license is LGPL. (I guess. I'm not a lawyer.)
Download it
here.