如何配置我的Java安装以进行开发 [英] How Do I Configure My Java Installation For Development

查看:82
本文介绍了如何配置我的Java安装以进行开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是java脚本的新手;一起编写脚本非常新颖。我最近

安装了JDK8以及NetBeans IDE。整个过程都很顺利。

我将两个安装位置文件都放到默认位置,假设现在这是最好的选择。一旦我开始阅读教程

并使用IDE编写一些代码,就可以编译我的第一个java脚本了。我打开命令提示符,CD到我的脚本所在的文件夹然后尝试调用'javac.exe'并很快意识到该死的东西没有听到我的声音!显然不在我的路径变量中。我在提示符处设置并且java被放置在路径变量中,我认为这是一件好事接受我想要我需要开发的实用程序的数量与java安装一起来听我说我在哪里在我的系统上。

我过去曾手动将大量开源实用程序放入%WinDir%并取得了巨大成功;在命令行上工作的任何地方,我都可以调用它们。这是Java安装的选项吗? Program files\java目录中有大量文件,所以这是复制或剪切并粘贴到Windows目录的问题,但我不想通过这样做遇到任何问题。

另外,我的路径是典型的C:\ Users \%username%,它显然不在程序文件路径中(我以为是但如果我不能直接调用程序在那里,我猜不是)有关如何进行一些重新配置的任何建议吗?

提前致谢!哦,操作系统是Windows 8.1

I'm new to java scripting; pretty new to scripting all together. I recently
installed JDK8 as well as the NetBeans IDE. The whole process went just fine.
I had both installation place files to the default locations assuming that for now that would be the best option. Once I began reading through the tutorials
and writing some code using the IDE, it came time to compile my first java script. I opened up the command prompt, CD to the folder where my script is located then attempted to invoke 'javac.exe' and quickly realized the damn thing didn't hear me! Apparently not in my path variable. I did "set" at the prompt and java was placed in the "path" variable which I think is a good thing accept I want the number of utility's that I need to develop that came with the java installation to hear me where ever I am on my system.
I have manually placed a good amount of open source utility's into %WinDir% in the past with great success; I can call on them wherever I happen to be when working on the command line. Is this an option for me with the Java installation? there are a large number of files in the Program files\java directory so it would be a matter of copying or cut and paste to the Windows directory but I don't want to run into any issues by doing that.
Also, My path is the typical "C:\Users\%username%" which obviously is not in the program files path ( I thought it was but if I cant directly call a program from there then I guess not) Any suggestions on how I might go about some Reconfiguring?
Thanks in advance! oh and OS is Windows 8.1

推荐答案

如果您已经安装了IDE,则无需转到命令提示符。只需打开IDE并创建一个新的Java项目并编写您的第一个程序。 IDE有编译,运行和调试,无需转到命令提示符。



如果你真的想在命令提示符下编译,请将PATH变量更新为包括jdk installataion文件夹直到bin目录。
If you have installed IDE, no need to go to the command prompt. Just open the IDE and create a new Java project and write your first program. The IDE has compile,run and debug,no need to go to the command prompt.

If you really want to compile in the command prompt, update the PATH variable to include the jdk installataion folder till bin directory.


这篇关于如何配置我的Java安装以进行开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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