in your Flex's main.mxml, you have something like
<mx:RemoteObject id="srv" destination="product"/>
You see here we define a RemoteObject whose destination is "product", what's is "product"?
You should find "product" in blazeds\WEB-INF\flex\remoting-config.xml
<destination id="product">
<properties>
<source>flex.samples.product.ProductService</source>
</properties>
</destination>
You see here we link product to a Java class called ProductService. So really, in main.mxml, when you call "srv.getProducts()", it's really calling ProductService.getProducts().
Now you see, how we could use Java class in Flex.