In general, using Java libraries from Scala code is simpler than using Scala materials in Java. This is because Scala has advanced features that are technically available in java but implemented by the Scala compiler, creating all kinds of additional classes with malformed names.
If your "main" program is now written in java, but you want to implement some functions or modules in scala, you should probably define your modules in terms of Java interfaces. Then use the Scala code for these interfaces.
I hope you will soon find that you like Scala so much that you switch to Scala, which is the main language that calls your old Java code.
Peter Recore
source share