﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-巷尾的酒吧-随笔分类-eclipse</title><link>http://www.blogjava.net/abin/category/52997.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 04 Jun 2013 23:05:44 GMT</lastBuildDate><pubDate>Tue, 04 Jun 2013 23:05:44 GMT</pubDate><ttl>60</ttl><item><title>java向图片上写字,两个图片合并的方法 </title><link>http://www.blogjava.net/abin/archive/2013/06/04/400197.html</link><dc:creator>abing</dc:creator><author>abing</author><pubDate>Tue, 04 Jun 2013 12:54:00 GMT</pubDate><guid>http://www.blogjava.net/abin/archive/2013/06/04/400197.html</guid><wfw:comment>http://www.blogjava.net/abin/comments/400197.html</wfw:comment><comments>http://www.blogjava.net/abin/archive/2013/06/04/400197.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/abin/comments/commentRss/400197.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/abin/services/trackbacks/400197.html</trackback:ping><description><![CDATA[<p>package writeimg;<br />import javax.imageio.ImageIO;<br />import java.awt.Color;<br />import java.awt.Font;<br />import java.awt.Graphics2D;<br />import java.awt.image.BufferedImage;<br />import java.io.File;<br />import java.io.IOException;<br />import java.net.URL;</p>
<p><br />public class pic {</p>
<p>&nbsp;private Font font = new Font("华文彩云", Font.PLAIN, 40);// 添加字体的属性设置</p>
<p>&nbsp;private Graphics2D g = null;</p>
<p>&nbsp;private int fontsize = 0;</p>
<p>&nbsp;private int x = 0;</p>
<p>&nbsp;private int y = 0;</p>
<p>&nbsp;/**<br />&nbsp; * 导入本地图片到缓冲区<br />&nbsp; */<br />&nbsp;public BufferedImage loadImageLocal(String imgName) {<br />&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;return ImageIO.read(new File(imgName));<br />&nbsp;&nbsp;} catch (IOException e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;return null;<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 导入网络图片到缓冲区<br />&nbsp; */<br />&nbsp;public BufferedImage loadImageUrl(String imgName) {<br />&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;URL url = new URL(imgName);<br />&nbsp;&nbsp;&nbsp;return ImageIO.read(url);<br />&nbsp;&nbsp;} catch (IOException e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;return null;<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 生成新图片到本地<br />&nbsp; */<br />&nbsp;public void writeImageLocal(String newImage, BufferedImage img) {<br />&nbsp;&nbsp;if (newImage != null &amp;&amp; img != null) {<br />&nbsp;&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;&nbsp;File outputfile = new File(newImage);<br />&nbsp;&nbsp;&nbsp;&nbsp;ImageIO.write(img, "jpg", outputfile);<br />&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 设定文字的字体等<br />&nbsp; */<br />&nbsp;public void setFont(String fontStyle, int fontSize) {<br />&nbsp;&nbsp;this.fontsize = fontSize;<br />&nbsp;&nbsp;this.font = new Font(fontStyle, Font.PLAIN, fontSize);<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 修改图片,返回修改后的图片缓冲区（只输出一行文本）<br />&nbsp; */<br />&nbsp;public BufferedImage modifyImage(BufferedImage img, Object content, int x,<br />&nbsp;&nbsp;&nbsp;int y) {</p>
<p>&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;int w = img.getWidth();<br />&nbsp;&nbsp;&nbsp;int h = img.getHeight();<br />&nbsp;&nbsp;&nbsp;g = img.createGraphics();<br />&nbsp;&nbsp;&nbsp;g.setBackground(Color.WHITE);<br />&nbsp;&nbsp;&nbsp;g.setColor(Color.orange);//设置字体颜色<br />&nbsp;&nbsp;&nbsp;if (this.font != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;g.setFont(this.font);<br />&nbsp;&nbsp;&nbsp;// 验证输出位置的纵坐标和横坐标<br />&nbsp;&nbsp;&nbsp;if (x &gt;= h || y &gt;= w) {<br />&nbsp;&nbsp;&nbsp;&nbsp;this.x = h - this.fontsize + 2;<br />&nbsp;&nbsp;&nbsp;&nbsp;this.y = w;<br />&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;this.x = x;<br />&nbsp;&nbsp;&nbsp;&nbsp;this.y = y;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;if (content != null) {<br />&nbsp;&nbsp;&nbsp;&nbsp;g.drawString(content.toString(), this.x, this.y);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;g.dispose();<br />&nbsp;&nbsp;} catch (Exception e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;return img;<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 修改图片,返回修改后的图片缓冲区（输出多个文本段） xory：true表示将内容在一行中输出；false表示将内容多行输出<br />&nbsp; */<br />&nbsp;public BufferedImage modifyImage(BufferedImage img, Object[] contentArr,<br />&nbsp;&nbsp;&nbsp;int x, int y, boolean xory) {<br />&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;int w = img.getWidth();<br />&nbsp;&nbsp;&nbsp;int h = img.getHeight();<br />&nbsp;&nbsp;&nbsp;g = img.createGraphics();<br />&nbsp;&nbsp;&nbsp;g.setBackground(Color.WHITE);<br />&nbsp;&nbsp;&nbsp;g.setColor(Color.RED);<br />&nbsp;&nbsp;&nbsp;if (this.font != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;g.setFont(this.font);<br />&nbsp;&nbsp;&nbsp;// 验证输出位置的纵坐标和横坐标<br />&nbsp;&nbsp;&nbsp;if (x &gt;= h || y &gt;= w) {<br />&nbsp;&nbsp;&nbsp;&nbsp;this.x = h - this.fontsize + 2;<br />&nbsp;&nbsp;&nbsp;&nbsp;this.y = w;<br />&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;this.x = x;<br />&nbsp;&nbsp;&nbsp;&nbsp;this.y = y;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;if (contentArr != null) {<br />&nbsp;&nbsp;&nbsp;&nbsp;int arrlen = contentArr.length;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (xory) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; arrlen; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.drawString(contentArr[i].toString(), this.x, this.y);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.x += contentArr[i].toString().length()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* this.fontsize / 2 + 5;// 重新计算文本输出位置<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; arrlen; i++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.drawString(contentArr[i].toString(), this.x, this.y);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.y += this.fontsize + 2;// 重新计算文本输出位置<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;g.dispose();<br />&nbsp;&nbsp;} catch (Exception e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;return img;<br />&nbsp;}</p>
<p>&nbsp;/**<br />&nbsp; * 修改图片,返回修改后的图片缓冲区（只输出一行文本）<br />&nbsp; * <br />&nbsp; * 时间:2007-10-8<br />&nbsp; * <br />&nbsp; * @param img<br />&nbsp; * @return<br />&nbsp; */<br />&nbsp;public BufferedImage modifyImageYe(BufferedImage img) {</p>
<p>&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;int w = img.getWidth();<br />&nbsp;&nbsp;&nbsp;int h = img.getHeight();<br />&nbsp;&nbsp;&nbsp;g = img.createGraphics();<br />&nbsp;&nbsp;&nbsp;g.setBackground(Color.WHITE);<br />&nbsp;&nbsp;&nbsp;g.setColor(Color.blue);//设置字体颜色<br />&nbsp;&nbsp;&nbsp;if (this.font != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;g.setFont(this.font);<br />&nbsp;&nbsp;&nbsp;g.drawString("<a href="http://www.hi.baidu.com?xia_mingjian">www.hi.baidu.com?xia_mingjian</a>", w - 85, h - 5);<br />&nbsp;&nbsp;&nbsp;g.dispose();<br />&nbsp;&nbsp;} catch (Exception e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;return img;<br />&nbsp;}</p>
<p>&nbsp;public BufferedImage modifyImagetogeter(BufferedImage b, BufferedImage d) {</p>
<p>&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;int w = b.getWidth();<br />&nbsp;&nbsp;&nbsp;int h = b.getHeight();<br />&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;g = d.createGraphics();<br />&nbsp;&nbsp;&nbsp;g.drawImage(b, 100, 10, w, h, null);<br />&nbsp;&nbsp;&nbsp;g.dispose();<br />&nbsp;&nbsp;} catch (Exception e) {<br />&nbsp;&nbsp;&nbsp;System.out.println(e.getMessage());<br />&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;return d;<br />&nbsp;}</p>
<p>&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;pic tt = new pic();</p>
<p>&nbsp;&nbsp;BufferedImage d = tt.loadImageLocal("D:\\11.jpg");<br />//&nbsp;&nbsp;BufferedImage b = tt<br />//&nbsp;&nbsp;&nbsp;&nbsp;.loadImageLocal("E:\\文件(word,excel,pdf,ppt.txt)\\zte-logo.png");<br />&nbsp;&nbsp; tt.writeImageLocal("D:\\cc.jpg",tt.modifyImage(d,"曹原",90,90)<br />&nbsp;&nbsp;//往图片上写文件<br />&nbsp;&nbsp; );</p>
<p>&nbsp;&nbsp;//tt.writeImageLocal("D:\\cc.jpg", tt.modifyImagetogeter(b, d));<br />&nbsp;&nbsp;//将多张图片合在一起<br />&nbsp;&nbsp;System.out.println("success");<br />&nbsp;}</p>
<p>}</p><br /><br /><br /><br /><br /><br /><a href="http://blog.csdn.net/caoyuan10036/article/details/7278735">http://blog.csdn.net/caoyuan10036/article/details/7278735</a><img src ="http://www.blogjava.net/abin/aggbug/400197.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/abin/" target="_blank">abing</a> 2013-06-04 20:54 <a href="http://www.blogjava.net/abin/archive/2013/06/04/400197.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>myEclipse项目转成Eclipse开发</title><link>http://www.blogjava.net/abin/archive/2012/11/10/391137.html</link><dc:creator>abing</dc:creator><author>abing</author><pubDate>Sat, 10 Nov 2012 08:00:00 GMT</pubDate><guid>http://www.blogjava.net/abin/archive/2012/11/10/391137.html</guid><wfw:comment>http://www.blogjava.net/abin/comments/391137.html</wfw:comment><comments>http://www.blogjava.net/abin/archive/2012/11/10/391137.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/abin/comments/commentRss/391137.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/abin/services/trackbacks/391137.html</trackback:ping><description><![CDATA[<span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">公司拿到手的项目开发平台都不统一。有的是myEclipse开发的，有的是Eclipse for J2EE开发的。<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">这里说一种把myEclipse项目转成Eclipse项目继续开发<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1.&nbsp; 请首先确保你的eclipse是javaee版本的，或者已经安装看wtp插件<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2.&nbsp; 然后修改eclipse工程下的.project文件:<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3.在&lt;natures&gt;&lt;/natures&gt;中加入<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;nature&gt;org.eclipse.wst.common.project.facet.core.nature&lt;/nature&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;nature&gt;org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/nature&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;nature&gt;org.eclipse.jem.workbench.JavaEMFNature&lt;/nature&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4. 在&lt;buildSpec&gt;&lt; ildSpec&gt;中加入<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;buildCommand&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;org.eclipse.wst.common.project.facet.core.builder&lt;/name&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arguments&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/arguments&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;/buildCommand&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &lt;buildCommand&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;org.eclipse.wst.validation.validationbuilder&lt;/name&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arguments&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/arguments&gt;&nbsp;</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp; &nbsp;&lt; /buildCommand&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">5. 刷新项目，项目-&gt;右击-&gt;Properties-&gt;Project Facets-&gt;Modify Project，选择Java和Dynamic Web Module配置Context Root 和Content Directory 以及源码路径<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">6. 第5步没有的话，找到项目的.setting目录，修改org.eclipse.wst.common.component&nbsp; 里面的<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&lt;wb-module&nbsp;&nbsp; deploy-name= "Demo "&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&lt;wb-resource&nbsp;&nbsp; deploy-path= "/ "&nbsp;&nbsp; source-path= "/WebRoot "/&gt;<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">这两个即可，deploy-name&nbsp;&nbsp; 为工程名，source-&nbsp;&nbsp; path= "/WebRoot "eclipse下默认为WebContent修改为WebRoot<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">svn<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">http://subclipse.tigris.org/update_1.6.x<span class="Apple-converted-space">&nbsp;</span></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/17px verdana, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxNewSize=256m -XX:MaxPermSize=256m</span> <img src ="http://www.blogjava.net/abin/aggbug/391137.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/abin/" target="_blank">abing</a> 2012-11-10 16:00 <a href="http://www.blogjava.net/abin/archive/2012/11/10/391137.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>