Java开发环境的配置.docx

上传人:小飞机 文档编号:4885626 上传时间:2023-05-21 格式:DOCX 页数:21 大小:1.25MB
返回 下载 相关 举报
Java开发环境的配置.docx_第1页
第1页 / 共21页
Java开发环境的配置.docx_第2页
第2页 / 共21页
Java开发环境的配置.docx_第3页
第3页 / 共21页
Java开发环境的配置.docx_第4页
第4页 / 共21页
Java开发环境的配置.docx_第5页
第5页 / 共21页
亲,该文档总共21页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《Java开发环境的配置.docx》由会员分享,可在线阅读,更多相关《Java开发环境的配置.docx(21页珍藏版)》请在三一办公上搜索。

1、分为三步:1.安装JDK(Java Development Kit), Java开发工具包;2. 安装Eclipse,此处解压即可3. 安装Tomcat(安装版),配置环境、JDK的下载安装:1. JDK的下载输入网址: 进入以下界面:ORACLe*Sign In/Register for Account Help Select Country/RegionTechnologiesJava SE Advanced & SuiteJava EmbeddedJavaFXJava OBWeb TierNew to JavaCommunityJava Magazine* JavaFXJava Adva

2、ncedHere are the Java SE downloads in detail:Java Platform, Standard EditioryJava Resources宣 JavaOneA Orac e ConferencesJava SE 7u7This releases address security concerns. Oracle strongly recommends that all Java SE 7 users upgrade to this release.Oracle Technology Network Java Java SE DownloadsJava

3、 St SupportJava CardJ以rJRE| DOWNLOAD 曜用 DOWNLOAD Content. Connections. Community. Java EE and Glassfish NetBeans IDENew to Java?单击红色箭头所指的位置,进入下一界面:单击红色箭头所指示的版本,下载最新版本的JDK。 囹i亟二7国.顼.以如丝二13瓯j2. JDK的安装双击上图显示图标,会出现如下界面:该过程要需要等待约一分钟,然后会出现:单击下一步,会出现:此处要记住该安装路径(注意:环境变量的配置是与此安装路径相一致的)当然也可以单 击更改来改变安装路径在安装过程中

4、会,有如下界面:这是对java runtime environment的安装,单击“下一步”即可。安装结束后,会出现如下图界面,单击“关闭”按钮,结束安装。3、JDK的环境配置要配置的变量有:JAVA_HOME、CLASSPATH和PATH三个变量首先,在Windows系统下,右击“我的电脑”,从淡出的快捷菜单中选择“属性”,在弹出 的“属性”对话框中选择“高级”选项卡,单击“环境变量”按钮,在出现的界面中“系统变量”列表框下单击“新建”按钮,添加环境变量。出现下面界面:单击“新建”在变量名处,输入:JAVA_HOME,然后再变量值处填入下图的地址:includ已COPYRIGHTregist

5、er_zh_CN 360seUFL5 KBLICENSE 文件 1 KBREAD迎 360seURL20., 230 KBTHIFDFWTYLICENS. 文本文档172 KBregister360seURL6 KBTHIFDFWYLICENS.文本文档123 KBbuseURL6 KB如下图所示,然后再新建一个CLASSPATH的变量,变量值处填入:.;%JAVA_HOME%libtools.jar;%JAVA_HOME%libdt.jar;%JAVA_HOME%jrelibrt.jar注意:最前面有一个:千万不要忘记该点然后再Path处填入以下内容“;JAVA_HOME%bin,,如下图:

6、Path后单击确定,回到环境变量界面单击确定,然后再单击确定就好了,此时JDK的环境 变量配置完成。新建文本文档,编写如下代码:public class hellopublic static void main(String args)System.out.println(Hello world!);然后将文本文档另存为:hello.java文件,将该文件复制到:C:Documents and SettingsAdministrator 路径下。然后打开运行窗口,输入如下命令,你会看到下图结果:WIND0WSsystem32cmdhicrosoft Uindous XP_版本 5-1-2600

7、1 版权所有 1985-2001 Microsoft CorpC: XDocuments and Sett ingsAdniinistratorjauac Hello . JauaC: XDocuments and Sett ingsXfldniinistFatoFjaua Hello Hello world?*C: XDocuments and Sett ingsXfldniinistFatoF2.1 Eclipse 的简介:Eclipse是一个集成开发环境的名字,主要用于Java开发,也可以通过插件实现其它语言如C/C+和PHP的开发等。Eclipse是一个 开放源代码的软件开发项日,专注

8、于为高度集成的工具开发提供一个 全功能的、具有商业品质的工业平台。它主要由Eclipse项日、Eclipse 工具项日和Eclipse技术项目三个项日组成,具体包括四个部分组成 Eclipse Platform、JDT、CDT 和 PDE。Eclipse SDK (软件开发者包)是 Eclipse Platform、JDT 和 PDE 所生产的组件合并,它们可以一次下载。这些部分在一起提供了一个 具有丰富特性的开发环境,允许开发者有效地建造可以无缝集成到 Eclipse Platform中的工具。Eclipse SDK由Eclipse项目生产的工具和来自其它开放源代码的第三方软件组合而成。Ec

9、lipse项日生产的软 件以GPL发布,第三方组件有各自自身的许可协议。2.2 Eclipse 的下载输入网址:http:/www.eclipse.org/,进入如下界面:Download EclipseFollow EclipseFdn Contribute Report a BugAnnouncements2012/08/30 Plugins DocumentationeciipsecoNLudwigsburg, Germany October 23 - 25EUROPE 2012Register for the Eclipse Fall 2012 Training SeriesThe E

10、clipse member companies are pleased to announce the Fall 2012 Training Series. We are pleased to introduce two new courses, Eclipse4 RCP and Building OSGKRCP with Maven/Tycho.2012/08Z28Eclipse Webinars: Learning about M2MM a ch ine-2-M a ch ine (M2M) or the Internet of Things (loT) is a technotogy a

11、rea and industry that is growing very quickly, has a lot of great potential but I am not sure is understood very well by the software industry.SquishCross-Platform2012/08/17Eclipse Testing Day Agenda AvailableThe third annual Eclipse Testing Day on 5 September in Darmstadt Germany provides insight i

12、nto testing for Eclipse applications and in the Eclipse community, including talks from Eclipse users and member companies. The agenda includes lightning talks on areas * beyond testing and an inter.GUI TestAutomation2012/08/16EclipseCon Europe Collaborates with Open Source Think TankEclipseCon Euro

13、pe 2012 is partnering with the Open Source Think Tank, October 26-27 in Stuttgart, Germany. This partnership provides special pricing forthose.Eclipse Marketplace2012/08/02Eclipse Day Krakow Call for Papers单击红色箭头指的位置,进入另一界面:More.* J Rebel for Eclipse2011S25 AgileReview2011/0206 Workshop RCP OSGi SDK

14、ecuPsecoNEUROPE 2012Ludwigsburg, Germany October 23 - 25Visit ottier Eclipse SitesmpHome Downloads Users Members Committers Resources Projects About UsGxTgle* Custom SearchSearchEclipse Juno (4.2) Packages forWindowsInstalling EclipseEclipse IDE for Java EE Developers 221 mbDownloaded 1,958,738 Time

15、sDetailsa Windows 32 Bit X Windows 64 Bit Install Guide Compare/Combine PackagesEclipse DownloadsPackages ProjectsFollow EclipseFdn Known IssuesEclipse Classic 4.2.182 mbDownloaded 1,474,392 TimesDetailsOther DownloadsA Windows 32 Bit 也 Windows 64 Bit Updating EclipseEclipse IDE for Java Developers

16、149 mbDownloaded 832,034 Times DetailsEclipse IDE for C/C+ Developers, uaweDownloaded 342,154 TimesDetails厚 Windows 32 Bit 喜 Windows 64 BitEclipse for Mobile Developers 143 mbHL Windows 32 Bit般Downloaded 165,806 Times Details害 Windows 64 BitEclipse for RCP and RAP Developers 227 mb厚 Windows 32 BitDo

17、wnloaded 66,129 Times Details喜 Windows 64 BitEclipse Modeling Tools 264 mba Windows 32 BitDownloaded 65,935 Times Details、害 Windows 64 BitEclipse IDE for Java and Report Developers 260 mb唇 Windows 32 BitvBIRTlDownloaded 65,085 Times Details* Windows 64 Bit Documentation Make a Donation Forums Eclips

18、e Juno (4.2)CRYSTAL REPORTSFOR ECUPSEa Windows 32 Bit 喜 Windows 64 BitRelated Links Eclipse Indigo (3.7)Eclipse IDE for Java EE Developers是针对企业版开发的Eclipse集成开发环境。主要用于开 发Web应用。配置Tomcat用,这个版本Eclipse IDE for Java Developers是针对普通Java工程开发,该版本找不到可配置Tomcat的 插件然后再次单击红色箭头所指的位置,进入下一界面:ecupsecoNEUROPE 2012Ludwi

19、gsburg, GermanyOctober 23 25Home Downloads Users Members Committers Resources Projects About Us, GoogkT custom searchSearchDownloads Home Bit Torrents Source code More PackagesEclipse downloads - mirror selectionAll downloads are provided under the terms and conditions of the Eclipse Foundation Soft

20、ware User Agreement unless otherwise specified.Download e cl i p s e-j ava-j un o-wi n32zi p from:Give Back to Eclipse| $5 | |$is| |$25|Donate $35 or more andBecome a Friend of Eclipse!PayPalChina Actuate Shanghai (http)透度Checksums: MD5 (SHA1 BitTorrent.or pick a mirror siteGet It Faster HereOther o

21、ptions for this fileThe Eclipse Foundation is a not-foc-Native installers for all OS platforms, lightning fast downloads. Manage HTTP mirrors only (xml)profit organization, not a charitableplugins and dependencies. For free FTP mirrors only (xml)单击红色箭头所指位置,即可开始下载最新的Eclipse集成开发环境。2.3 Eclipse的安装(解压):将

22、Eclipse解压,此处解压路径为:F:如下图:文件夹目录下的内容是:双击图中的紫色图标,未安装JDK时,会出现如下界面:Eclipseavaw. exeA Java Runtiid已 Environm已nt (JRE) or Java Developm已nt Kit (JDK) must be available in order to run Eclipse. No Java virtual machir was found 己ft已r s已arching the following locations:F:、已clips已jr已、binjjavaw. exe in your curren

23、t PATH确定安装JDK以后则会在双击该紫色图标后,打开Eclipse的工程界面。可以在“Browse”处更改项目文件的存放路径。单击“OK”后,会出现如下界面:单击File新建JAVA Project然后再新建Java File,然后输入代码如下图:右击红色箭头所指部分,选择新建Class,然后会出现下面界面:在上图中输入类名,然后单击Finish然后再新建的类文件中输入代码,如下图:然后单击代码窗口上边的绿色箭头,运行程序,运行结果如下所示:此时,证明Eclipse可以进行Java项目开发了。三、Tomcat:3.1 Tomcat的简介Tomcat 是 Apache 软件基金会(Apac

24、he Software Foundation)的Jakarta项目中的一个核心项目,由Apache、Sun和其他一些公司及个人共同开发而成。由于有了 Sun的参与和支持,最新的Servlet和 JSP规范总是能在Tomcat中得到体现,Tomcat 5支持最新的Servlet 2.4和JSP 2.0规范。因为Tomcat技术先进、性能稳定,而且免费, 因而深受Java爱好者的喜爱并得到了部分软件开发商的认可,成为 日前比较流行的Web应用服务器。日前最新版本是7.0Tomcat很受广大程序员的喜欢,因为它运行时占用的系统资源 小,扩展性好,支持负载平衡与邮件服务等开发应用系统常用的功能; 而且

25、它还在不断的改进和完善中,任何一个感兴趣的程序员都可以更 改它或在其中加入新的功能。Tomcat是一个轻量级应用服务器,在 中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和 调试JSP程序的首选。(以上内容来源于百度百科)1. Java Servlet是指一个servlet就是Java编程语言中的一个类,它被用来扩展服务器的 性能,服务器上驻留着可以通过“请求-响应”编程模型来访问的应用程序。虽然servlet可 以对任何类型的请求产生响应,但通常只用来扩展Web服务器的应用程序。Java Servlet技 术为这些应用程序定义了一个特定于HTTP的servlet类。javax.s

26、ervlet和javax.servlet.http包为编写servlet提供了接口和类。所有的servlet都必须 实现Servlet接口,该接口定义了生命周期方法。当实现一个通用的服务时,您可以使用或扩展由Java Servlet API提供的GenericServlet 类。HttpServlet类提供了一些方法,诸如doGet和doPost,以用于处理特定于HTTP的服务.2. JSP技术有点类似ASP技术,它是在传统的网页HTML文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件(*.jsp)。用JSP开发的Web应用是

27、跨平台的,即能在Linux下运行,也能在其他操作系统上运行。JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过 tags和scriptlets访问存在于服务端的资源的应用逻辑。JSP将网页逻辑与网页设计和显示分 离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。3.2 Tomcat的下载输入网址:http:/tomcat.apache.org/ 进入界面:Apache Tomcat. Home Taglibs Maven PhiginDownload Which version, Tomcat 7.0

28、. Tomcat 6一0. Tomcat 5一5.Tomcat Connectors Tomcat Native ArchivesDocumentation. Tomcat 二0 Tomcat 6一0 Tomcat 55 Tomcat Connectors Tomcat Native, Migration GuideApache TomcatApache Tomcat is an open source software inqjlementation of the Java Servlet and 曜technologies. The Java Servlet and JavaServer

29、Pages specificationsare developed under the Java Community Process-Apache TomcatySkBApacheSoftware Foundationhttp :/www.apache.org/Search the SiteSearch Site |Apache Tomcat is developed in an open and partic也atory emironment and released under the Apache License version 2一 Apache Tomcat is intended

30、to be a collaboration of the best-ofbreed developers from aroimd the world. We incite you to partic姑ate in this open development project. To learn more about getting involved, click here.Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries

31、 and organizations. Some of these users and their stories are listed on the PoweredBy wiki page.Apache Tomcat. Tomcat. Apache, the Apache feather, and the Apache Tomcat project logo are trademarks of the Apache Software Foundation.Tomcat 7.0.30 Released2012-09-06The Apache Tomcat Project is proud to

32、 announce the release of version 7.0.30 of Apache Tomcat. This release contains numerous bug fixes and improvements conared to version 7.0.29. The notable changes include: Significantly reduced memory footprint during web application start while Servlet 3.0 annotation and SCI scanning is in progress

33、. Adds support for scanning of classes that use Java 7 specific byte code for Servlet 3.0 annotation and SCI scanning. Inq?ro ements to DIGEST and FORM authentication.Full details of these changes, and all the other changes, are available in the Tomcat 7 changelogDownload | ChanceLogfbr 7.0.30单击红色箭头

34、进入下一界面:Binary Distributions Core:c 血(口巫 md5)c tar-职(vsp. md5)c 32-bit Windows zip (口职 mdS)c 64-bit Windows zip (口职 md5)c 64-bit Itaniut.WindQws zipo 3%砸64:斑.咽瑚竺更甚.堂页乂矗甄口卯:少.Full documentation:=tar-职(口霁=md5) Deployer:c 血(口零=tnd5)c tar一取(口零=tnd5) Extras:c JXIX Remote jar (口姬 md5)c Web servid jar (口姬 m

35、d5)c JULJ adglters jar (口职 ind5)c JULI 1。间 jar (口职 md5),Embedded:c tar-职(vsp. md5)c虫3姬md5)下载得到:那酒!京.了云,知心u3.3 Tomcat 安装双击Tomcat图标:然后依次的界面如下:EApache Tomcat SetupnWelcome to the Apache Tomcat Setup WizardThis wizard will guide you through the installation of Apache Tomcat.It is recurnmended that you c

36、lose all other applications before starting Setup. This will make it possible to update relevant system Hies withuijt having to rebuut your computer.Click Next to continue.Apache Tomcat 7Next Cancel单击NextBApache Tomcat SetupLicense AgreementPlease review the license terms before installing Apache To

37、mcat.Press Page Down to see the rest of the agreement.Apache LicenseVersion 2,0, January 2004TERM5 AND CONDITIONS FOR U5EREPRODUCTION, AND DISTRIBUTION1. Definitions.License shall mean the terms and conditions for lilereproduction and distribution as defined by Sections 1 through 9 of this document.

38、IF you accept the terms of the agreement click I Agree to continue. You must accept the agreement to install Apache Tomcat.Nullsoft Install System v2A6 Back I AgreeCancel单击I Agree做如下选择,单击Next在 User Name 处 填入:admin在 Password 处填入:admin 单击:Next单击Next单击 Install等待安装完成。在浏览器中输入:http:/localhost:8080/证明Tomca

39、t安装成功。3.4 Tomcat的环境配置三个环境变量的添加:文件 编辑3)查看世)收藏 工具(1)帮助也)Q后退Q 夕搜索上文件夹 地址 IDJ | j D : i. apache-tome a t 7. 0. 11 i.lib文件和文件夷任翦重命名这个文件移动这个文件复制这个文件将这个文件发布到腿以电子邮件形式发送此 文件册除这个文件习:diiiLu tati uns-ap i口atalinag tai in ar antcat:dlirL:_hacat:dlirL:_tribesecj-3. 6el- :p ij asp er项 j asp er-eljsp-api一Ieervlet- api其它位置*t um a at-迎 it om c at- c oy u t e我的文档tom a at-i1Sn-estom c at-i1Sn-fr共享文档我的电脑网上邻居详细信息从上图得到:;C:ProgramFilesJavajdk1.7.0libtools.jar;D:apache-tomcat-7.0.11libservlet-api.jar如下图所示最后变量为:此处:D:、apache-tomcat-7.0.11 为 Tomcat 的安装路径

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号