As you may have noticed, Jaspersoft Studio is a repackaged eclipse. And yes it is possible to run Java code in it, it's just a bit more cumbersome than in vanilla eclipse.
In any of your jasper projects (the project icon in the explorer should have a little J
), right click and open Properties.
In Java Build Path
, add a new source folder.
In your new folder, create a new File, and put your main class in it.
You can now run it with the keyboard shortcut Alt-Shift-x j
. I don't know if there's a menu for that too.
Additionally if you have an existing eclipse project, you can import it directly into Jaspersoft Studio using Import... Existing Projects into Workspace
.