Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
114 views
in Technique[技术] by (71.8m points)

java - Extract scala source code from jar

So I have a jar file that contains scala as the source code and I have lost the original code. Is there a way to convert the class files in the jar to scala functions and classes instead of the java classes the compiler makes?

I have tried using a decompiler on it and it only gives me the java code that makes zero sense.

Thank you in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You'd need a Scala-specific decompiler. There is no reason one couldn't be written, but it would be a large effort and so far as I know nobody has actually done it. Of course, it wouldn't produce exactly the original code, just as decompilers for other languages don't.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...