Is there a way to call the Engine.scala as soon as the Recorder.scala is called in a java file.

[Help Needed]
I am a newbie in Gatling and trying to pick up the tool slowly.

I have created a maven project in scala IDE using the instructions mentioned in https://gatling.io/docs/2.3/extensions/maven_archetype/ . It works fine, both java and scala files are compiling and running successfully. The problem starts when i try using calling the recorder object and Engine object in a java file.

Problem 1: Maven throws error, when trying to call the scala objects in the java file. I think, i need to work in depth on this and might require more googling. But, if you could help me out with a pom file which does the execution of both scala and java files, would be very helpful.

Problem 2: I am calling stoprecording in the java file to stop the recording and generate the recorded scala file. But, the jvm is killed as soon as i have called the function. My objective is to start recording and stop recording and then once the recorded simulation is generated then run the simulation. All of these to be done from a java file.