Hi Stevenson,
your idea sounds very "adventurous"
I understand what you are trying to achieve but I guess this would become more complex than you might think.To summarize: You need some piece of application which someone has to use in order to login to your friend's wi-fi access point, correct?
I must admit, I've never thought of implementing this by myself but I would say that the network layer for PPPoE is more low-level than necessary. You probably could get away with a VPN client which is at least one network layer above. But even this won't be possible in pure Java for the reasons we discussed above. Java was simply never designed for system programming task on the OS level. Nevertheless you could surely create some kind of GUI part with Java and implement the missing parts (the low-level details) via JNI in native code with C or something like this. Then again it would be very, very, very complex to provide any new secure VPN technology. You will have to rely on existing technologies like IPSec. Then again if you use standard protocols your "customers" won't be forced to use your VPN client as any compatible client software will do.
Another completely different idea would be to implement something like a proxy server. But I don't have any really good ideas how it should work to show some ads and don't annoy the users. And as it is on a higher level (and probably could be done in plain Java) it doesn't work as transparently as the ideas with a VPN or PPPoE. Probably you would have to implement a proxy for every application protocol you want to support like HTTP, SMTP etc.
Sorry, but these were the best ideas which come to mind at the moment. Also no really mature ideas. There would still be a lot to do for any of these thoughts, I guess. And implementing any network protocol correctly, perhaps with cryptography in mind, is surely not a trivial task.
Hopefully someone other can come up with better and more detailed ideas. Anyway, good luck and let us hear if you've found a working solution
Marco