Minecraft, as ugly as it is, is rather popular and written in Java and leveraged the JVM quite a bit. As long the children have a desire to try and find Hero Brine or build their own little words, Java will be around for a while.
For starters, I'm 37 and still doing tech. On my current project, I am the youngest guy on the team by about 10 years. Furthermore, my Father-in-law was 71 when he retired as a system admin. He was remarkably current on all Solaris and Linux system. He is still an excellent python developer today. With that said, I don't see it as a problem to continue in tech.
One caveat though: my current employer is located in the suburbs. I used to work in downtown Boston where everyone was well under 40, if not 35. Once I got out of the city, I noticed that everyone was older, or saddled with kids (as was my reason for moving out of the city). Basically, I find that agism is more prevalent in your urban/hipster areas than out in the 'burbs. The fact that I'm working with bright guys in their late 40's, gives me great faith that I can be a techie for much longer.