Java.io.File to com.jme3.texture.Texture

I’m making a terrain preview tool. In simpleInitApp() I pop up a JFileChooser. Then I would wish to make a heightmap out of that (the code makes sure that the file is an image).

P.S. I can’t find a way to convert the File into Texture.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset