本文介绍了Scala程序需要JDK/open JDK作为先决条件,否则JRE就足够了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Scala编译器会生成像Java编译器这样的字节码,可以在依赖于平台的JVM上运行?然后为什么我们需要完整的JDK作为先决条件?它是在scala中包含少量Java项目并对其进行调试吗?请提供一些见识.

The Scala compiler generates byte code like Java compiler which could be run on a platform dependent JVM right?Then why do we need complete JDK as a pre-requisite?Is it for including few Java items within scala and debugging it?Please provide some insights.

推荐答案

我刚刚在具有sbt和JRE但没有JDK的系统上测试了此声明.编译正常:不需要JDK.如果要对.jar文件进行签名或做其他晦涩的事情,则需要用它作为jarsigner.

I've just tested this claim on a system with sbt and a JRE but no JDK. Compiling works fine: the JDK is not required. You'll need it for jarsigner if you are going to sign your .jar files or do other obscure things.

这篇关于Scala程序需要JDK/open JDK作为先决条件,否则JRE就足够了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:22