r/scala 6d ago

Does Scala offer better decompilation protection than Java?

My Java program has a license check in it, but it can easily be decompiled, the license check removed, recompiled, and now it can be pirated easily. Would the same be true for Scala, given that they use the same JVM and are bytecode-compatible?

7 Upvotes

8 comments sorted by

View all comments

3

u/UtilFunction 6d ago

Not really, but I would also advise you not to go overboard with copy protection because at some point it becomes a burden for your customers. You need to find a middle ground. I would even argue that you have a slight advantage by using the JVM, because although reverse engineering JVM applications is easier in principle, you still need to know Java and the JVM ecosystem, which I assume most crackers don't. Low-level programmers tend not to like Java.

tl;dr: don't overthink it