如何在Windows中编译Java代码而不安装整个JDK? [英] How can I compile Java code in Windows without installing the whole JDK?

查看:130
本文介绍了如何在Windows中编译Java代码而不安装整个JDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设运行时环境(1.6.0_01-b06版)已经就位,但由于我在这台特定的PC上缺少管理权限,所以无法安装JDK。那么,有没有任何可移植的JDK或Windows独立的Java编译器,不需要安装?

Let’s say the runtime environment (version 1.6.0_01-b06) is already in place, but since I lack administrative privileges in this particular PC, the JDK can’t be installed. So, is there any portable JDK or standalone Java compiler for Windows that doesn’t require installation?

推荐答案

tools.jar文件从JDK(你必须从另一台机器上复制),并看看是否工作。

You might try taking the tools.jar file from the JDK (you would have to copy it over from another machine) and see if that worked.

javac本质上是一个小exe,启动VM与编译器的特定类。

javac is essentially a small exe that starts the VM with the specific class for the compiler.

此外,没有什么(我知道)关于JDK安装,你不能做一个副本从另一台机器。所以上机,你可以安装JDK,安装它,然后将文件复制到机器上你没有权利的地方,它应该工作。

Also, there is nothing (that I am aware of) about the JDK install that you couldn't do with a copy of it from another machine. So get on a machine you can install the JDK on, install it, and then copy the files to a place on the machine that you lack the rights to and it should work.

这篇关于如何在Windows中编译Java代码而不安装整个JDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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