安装过程_系统安装过程
安装过程由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“系统安装过程”。
(1)安装jdk1.6
jdk下载地址为:http://download.java.net/jdk6/ jdk安装完成后,“我的电脑”右键“属性”,在“高级”选项卡中选择环境变量,按如下要求设置。设置环境变量:
在系统变量中新建两个变量JAVA_HOME及clapath。JAVA_HOME: C:Program FilesJavajdk1.6.0_10 clapath:.;%JAVA_HOME%lib;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar;Path:;C:Program FilesJavajdk1.6.0_10bin 效果如下图所示:
(2)安装MyEclipse6.0
整个安装过程可能需要几分钟的时间,所以要耐心等待。在安装的时候最好选择安装路径,一般不要装在系统盘为好。
安装完成后,要进行注册,否则MyEclipse只有一个月的试用期~ 注册:
在此使用一个java文件进行注册,在dos命令窗口中输入如下命令 javac MyEclipseGen.java java MyEclipseGen 注:MyEclipseGen.java文件见附录~~ 运行效果如图所示:
首次运行MyEclipse时,弹出的注册窗口中,点击第二个按钮,输入register name及相应的serial即可完成注册。
(3)安装tomcat6.0
配置tomcat:
运行MyEclipse,点击下图所示的run server的黑色小三角,选择configure server,弹出新对话如图所示。
选择tomcat 6.x,并将tomcat server勾选enabled。在tomcat home directory一栏,单击浏览,选择tomcat6.0的安装路径。例如,这里tomcat的路径是:D:Program FilesApache Software FoundationTomcat 6.0。注意,路径一定要完整,要到tomcat6.0为止。
到此结束,tomcat配置完成。运行MyEclipse,就可以在其中进行web 程序的开发了~~~~~
附录:MyEclipseGen.java内容如下: import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;/** * 来自网上的一个MyEclipse的java版的注册机。* * EG.: * * please input register name: administrator * Serial:nLR8ZC-855575-***18 * */ public cla MyEclipseGen { private static final String LL = “Decompiling this copyrighted software is a violation of both your license agreement and
the
Digital
Millenium
Copyright
Act
of
1998(http://www.loc.gov/copyright/legislation/dmca.pdf).Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense.Think about it;pay for a license, avoid prosecution, and feel better about yourself.”;
public String getSerial(String userId, String licenseNum){ java.util.Calendar cal = java.util.Calendar.getInstance();cal.add(1, 3);cal.add(6,-1);java.text.NumberFormat nf = new java.text.DecimalFormat(“000”);licenseNum = nf.format(Integer.valueOf(licenseNum));String verTime = new StringBuilder(“-”).append(new java.text.SimpleDateFormat(“yyMMdd”).format(cal.getTime())).append(“0”).toString();String type = “YE3MP-”;String need = new StringBuilder(userId.substring(0, 1)).append(type).append(“300”).append(licenseNum).append(verTime).toString();String dx = new StringBuilder(need).append(LL).append(userId).toString();int suf = this.decode(dx);String code = new StringBuilder(need).append(String.valueOf(suf)).toString();return this.change(code);} private int decode(String s){ int i;char[] ac;int j;int k;i = 0;ac = s.toCharArray();j = 0;k = ac.length;while(j
private String change(String s){ byte[] abyte0;char[] ac;int i;int k;int j;abyte0 = s.getBytes();ac = new char[s.length()];i = 0;k = abyte0.length;while(i = 48)&&(j = 97)&&(j
public MyEclipseGen(){ super();}
public static void main(String[] args){ try { System.out.println(“please input register name:”);BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));String userId = null;userId = reader.readLine();MyEclipseGen myeclipsegen = new MyEclipseGen();String res = myeclipsegen.getSerial(userId, “20”);System.out.println(“Serial:” + res);reader.readLine();} catch(IOException ex){ } } }