从jar中提取Scala源代码 [英] Extract scala source code from jar

查看:141
本文介绍了从jar中提取Scala源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个jar文件,其中包含scala作为源代码,并且丢失了原始代码.有没有一种方法可以将jar中的类文件转换为scala函数和类,而不是编译器创建的java类?

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?

我尝试在其上使用反编译器,但它只给我带来零意义的Java代码.

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

提前谢谢!

推荐答案

您需要特定于Scala的反编译器.没有理由不能写,但这是一个很大的努力,据我所知,实际上没有人写过.当然,它不会产生完全原始的代码,就像其他语言的反编译器不会一样.

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.

这篇关于从jar中提取Scala源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆