eclipse运行程序没有jdk [英] eclipse running programs without jdk

查看:244
本文介绍了eclipse运行程序没有jdk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们不需要jdk安装来在eclipse中编译和执行java程序。 jre安装就足够了但是从cmd运行代码时,我们需要安装jdk。
eclipse随附任何javac。我尝试在eclipse文件夹中搜索javac,但没有得到任何结果。请澄清。

Why is it that we do not need a jdk installation to compile and execute java programs in eclipse. a jre installation suffice. but while running the code from cmd we need to have jdk installed. does eclipse comes with any alternate javac. I tried searching for javac in eclipse folder, but did not got any result. please clarify.

推荐答案

Eclipse有自己的内置增量编译器。要运行你的项目,它需要一个JRE,你可以去 Project - >属性 - > Java构建路径 - >库,并查看添加到项目中的默认JRE库(如果希望程序在其他Java版本上运行,或者例如IBM JDK,则可以修改此文件)。

Eclipse has its own builtin incremental compiler. To run your projects it requires a JRE, you can go to Project -> properties -> Java Build Path -> libraries and see a default JRE library added to your project (You can modify this if you want your program running on other java versions or for example IBM JDK).

您的系统上需要一个JRE才能运行eclipse本身,它在路径变量中定义或在 eclipse.ini 文件(Eclipse也使用这个JRE版本,并在这个级别自动设置默认项目编译合规性级别)。

A JRE is required on your system to run eclipse itself, which is metioned either in the path variable or specified in eclipse.ini file (Eclipse also uses this JRE version and automatically set the default project compile compliance level at this level).

这篇关于eclipse运行程序没有jdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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