I guess there is a basic thing that you missunderstood:
your Proto class extends SimpleApplication just as your Main class does.
So question: How many applications do you want to program?
Answer: one 
Thus only one class should extend SimpleApplication (as the wiki mentions, the name might be missleading, in that it has nothing to do with “simple”, it just means this class already is a simple form of an application, by adding components you make it “non-simple”)
Now since games tend to become complex, youre on the right path not to put all code into your Main class, but separate the code instead.
Not sure how familar you are with programming, especially object oriented programming (you even tried to extend Main in your Proto class), but you can add custom behaviour to your application via “composition over inheritance”, thats what appStates are for. (just as controls are for spatials) Think about the Terrain and the LodControl: you basically add the level-of-detail-ability to your terrain without creating a new class that extends QuadTerrain, instead you add a control to the already existing class to “extend” its capabilities. AppStates are the same for your Application, you dont extend it further and further, instead you add capabilities using AppStates
Now youre on the right track here too, putting your terrain-related code into an appState is reasonable. Just it would have to look something like:
public Main() {
//do not call start() here, as you are starting the application in the main(String[] args)-Method
//doesnt make a difference in this case but looks cleaner (and its not good to call methods before an object has been fully instanciated but its more complex)
}
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
//here you create an instance of your custom "game component" that
//you want to add to your game, ie the terrain
ProtoTerrainState terrainState = new ProtoTerrainState();
stateManager.attach(terrainState);
//and do other setup like flyCam (but in general you will find less
//and less code to actually be here in this method)
flyCam.setMoveSpeed(50);
}
@Override
public void simpleUpdate(float tpf) {
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
and your ProtoTerrainState.java:
public class ProtoTerrainState extends BaseAppState {
private Node terrainNode = new Node("terrain");
private Material mat_terrain = null;
// and so on...
@Override
protected void initialize(Application app) {
//get a reference to the assetManager of the Application
//remember, you are no longer inside this Application where you have
//access to assetManager, rootNode etc.., but instead youre inside another object
//and thus need to use the reference that was passed to the method, it will be a
//reference to that one single Main-class that you created
//in your main(String[] args) Method
AssetManager assetManager = app.getAssetManager();
//now initialize everything you want...
mat_terrain = new Material(assetManager,
"Common/MatDefs/Terrain/Terrain.j3md");
mat_terrain.setTexture("Alpha", assetManager.loadTexture(
"Textures/Terrain/splat/alphamap.png"));
//... and so on...
//until here:
//rootNode.attachChild(terrain);
//this wont work because you dont have access to the rootNode instance
//instead you add it to the node that you created at the top of this class
terrainNode.attachChild(terrain);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera());
terrain.addControl(control);
//just as the rootNode, you cannot use the flyCam here, instead i moved this line into Main-class
//also because it is not related to the terrain, so no point to put it here
}
@Override
protected void cleanup(Application app) {
}
@Override
protected void onEnable() {
//now the last important thing is: you have to attach the node that is now holding
//the terrain to the rootNode of you application, a good place to do that is here
//because it means you can add and remove your terrain simply by enabling / disabling
//this AppState
((SimpleApplication)getApplication()).getRootNode().attachChild(terrainNode);
}
@Override
protected void onDisable() {
//same as above, just we want to remove it upon disabling
((SimpleApplication)getApplication()).getRootNode().detachChild(terrainNode);
}
}
I have not tested this code so i hope i didnt forget anything, but i hope it makes things a little clearer
greetings from the shire,
samwise