﻿<?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>C++博客-Late Not Bad-文章分类-Linux(Ubuntu)</title><link>http://www.cppblog.com/lateCpp/category/15809.html</link><description>不带感情的学习技术</description><language>zh-cn</language><lastBuildDate>Wed, 10 Aug 2011 07:15:31 GMT</lastBuildDate><pubDate>Wed, 10 Aug 2011 07:15:31 GMT</pubDate><ttl>60</ttl><item><title>Fedora15开启蓝牙功能</title><link>http://www.cppblog.com/lateCpp/articles/152005.html</link><dc:creator>lateCpp</dc:creator><author>lateCpp</author><pubDate>Thu, 28 Jul 2011 13:04:00 GMT</pubDate><guid>http://www.cppblog.com/lateCpp/articles/152005.html</guid><wfw:comment>http://www.cppblog.com/lateCpp/comments/152005.html</wfw:comment><comments>http://www.cppblog.com/lateCpp/articles/152005.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lateCpp/comments/commentRss/152005.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lateCpp/services/trackbacks/152005.html</trackback:ping><description><![CDATA[Fedora15l默认是没有开启蓝牙服务的。所以在上面的蓝牙图标里，可以看见：Blueteeth可以置为On,但是Visibility却不可置为ON。<br />这时只需要输入一条命令：<br /><span class="Apple-style-span" style="font-size: 13px; "><span style="color: #008000; ">#</span><span style="color: #008000; ">systemctl&nbsp;start&nbsp;bluetooth.service<br /><strong><br /></strong><br /></span></span><img src ="http://www.cppblog.com/lateCpp/aggbug/152005.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lateCpp/" target="_blank">lateCpp</a> 2011-07-28 21:04 <a href="http://www.cppblog.com/lateCpp/articles/152005.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu下安装Eclipse+Java环境变量配置+设置桌面启动方式 </title><link>http://www.cppblog.com/lateCpp/articles/144460.html</link><dc:creator>lateCpp</dc:creator><author>lateCpp</author><pubDate>Mon, 18 Apr 2011 05:33:00 GMT</pubDate><guid>http://www.cppblog.com/lateCpp/articles/144460.html</guid><wfw:comment>http://www.cppblog.com/lateCpp/comments/144460.html</wfw:comment><comments>http://www.cppblog.com/lateCpp/articles/144460.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lateCpp/comments/commentRss/144460.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lateCpp/services/trackbacks/144460.html</trackback:ping><description><![CDATA[<p>&#160;</p>
<span style="font-size: 14pt;">
<p>最近要用GridSim做一个仿真，是Java环境下的开发环境。</p>
<p>终于，我又一次要使用Java这个我始终未能上手的语言了。</p>
</span>
<p>&#160;</p>
<br>
<h1>1.配置java环境变量。</h1>
<br>&nbsp; 以下引用来自：<a href="http://blog.csdn.net/siaslance/archive/2007/09/07/1775705.aspx">http://blog.csdn.net/siaslance/archive/2007/09/07/1775705.aspx</a> 原文有更多的内容可供学习。
<div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;"></span><span style="color: #000000; font-size: 14pt;">　　　　&#183;用文本编辑器打开</span><span style="color: #000000;">/</span><span style="color: #000000;">etc</span><span style="color: #000000;">/</span><span style="color: #000000;">profile<br>　　　　&#183;在profile文件末尾加入：<br><br>　　　　　　JAVA_HOME</span><span style="color: #000000;">=/</span><span style="color: #000000;">usr</span><span style="color: #000000;">/</span><span style="color: #000000;">share</span><span style="color: #000000;">/</span><span style="color: #000000;">jdk1.</span><span style="color: #000000;">5</span><span style="color: #000000;">.0_05<br>　　　　　　PATH</span><span style="color: #000000;">=</span><span style="color: #000000;">$JAVA_HOME</span><span style="color: #000000;">/</span><span style="color: #000000;">bin:$PATH<br>　　　　　　CLASSPATH</span><span style="color: #000000;">=</span><span style="color: #000000;">.:$JAVA_HOME</span><span style="color: #000000;">/</span><span style="color: #000000;">lib</span><span style="color: #000000;">/</span><span style="color: #000000;">dt.jar:$JAVA_HOME</span><span style="color: #000000;">/</span><span style="color: #000000;">lib</span><span style="color: #000000;">/</span><span style="color: #000000;">tools.jar<br>　　　　　　export&nbsp;JAVA_HOME<br>　　　　　　export&nbsp;PATH<br>　　　　　　export&nbsp;CLASSPATH<br><br>　　　　&#183;重新登录<br>　　　　&#183;注解<br>　　　　　　a.&nbsp;你要将&nbsp;</span><span style="color: #000000;">/</span><span style="color: #000000;">usr</span><span style="color: #000000;">/</span><span style="color: #000000;">share</span><span style="color: #000000;">/</span><span style="color: #000000;">jdk1.</span><span style="color: #000000;">5</span><span style="color: #000000;">.0_05jdk&nbsp;改为你的jdk安装目录<br>　　　　　　b.&nbsp;linux下用冒号&#8220;:&#8221;来分隔路径<br>　　　　　　c.&nbsp;$PATH&nbsp;</span><span style="color: #000000;">/</span><span style="color: #000000;">&nbsp;$CLASSPATH&nbsp;</span><span style="color: #000000;">/</span><span style="color: #000000;">&nbsp;$JAVA_HOME&nbsp;是用来引用原来的环境变量的值<br>　　　　　　　&nbsp;在设置环境变量时特别要注意不能把原来的值给覆盖掉了，这是一种<br>　　　　　　　&nbsp;常见的错误。<br>　　　　　　d.&nbsp;CLASSPATH中当前目录&#8220;.&#8221;不能丢,把当前目录丢掉也是常见的错误。<br>　　　　　　e.&nbsp;export是把这三个变量导出为全局变量。<br>　　　　　　f.&nbsp;大小写必须严格区分。</span></div>
<br>
<h1>2.安装Eclipse.</h1>
<span style="font-size: 14pt;"><br>
<ol>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; 到Eclipse官网上下载需要的版本。下载地址： <a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></li>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; 解压即可使用，无需安装。——我下载的是<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: Arial,sans-serif; font-size: 12px; line-height: 16px;"><span class="title" style="margin: 0px; padding: 0px; border-width: 0px; outline-width: 0px; font-size: 16px; text-align: left; line-height: 16px; font-weight: bold;"><span style="margin: 0px; padding: 0px; border-width: 0px; outline-width: 0px; font-size: inherit; text-align: left; color: #111111; font-weight: bold; text-decoration: none; cursor: pointer;">Eclipse IDE for Java Developers</span></span>。</span></span></li>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; 启动：在命令行里进入到Eclipse的目录下，&#8220;./eclipse&#8221;命令即可。但是，一般会出现："Can't find JVM in the location"的问题。</li>
</ol>
</span>
<ol>
    <li></li>
</ol>
<div style="margin-left: 80px;">解决：可以加上-vm参数，并手动指定虚拟机所在的目录。<br></div>
<br>
<h1>3.创建快捷方式。</h1>
<br>
<ul>
    <li>&nbsp;&nbsp;&nbsp;<span style="font-size: 14pt;">&nbsp; 创建快捷方式首先解决的问题是，让Eclipse自己找到JVM所在的目录，而不要我们再用-vm参数指定。</span></li>
</ul>
<br>
<h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 方法：</h2>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: 14pt;">修改eclipse所在目录下的eclipse.ini文件，将原来需要用-vm指定的内容加进去。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这个文件设定了一些eclipse启动时设定的默认操作。需要注意的是</span>：<span style="font-size: 24pt;"><span style="font-weight: bold;">必须分行！！</span></span><span style="font-weight: bold;"></span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008080; font-size: 14pt;">1</span>&nbsp;<span style="color: #000000;">-</span><span style="color: #000000;">vm<br></span><span style="color: #008080;">2</span>&nbsp;<span style="color: #000000;"></span><span style="color: #000000;">/</span><span style="color: #000000;">your</span><span style="color: #000000;">/</span><span style="color: #000000;">jvm</span><span style="color: #000000;">/</span><span style="color: #000000;">dir</span><span style="color: #000000;">/</span></div>
<br>并且，这些参数要加在<br>
<div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000; font-size: 14pt;">-</span><span style="color: #000000;">vmargs</span></div>
<span style="font-size: 24pt; font-weight: bold;">之前</span>，不然不起作用。<br><br><br>
<ul>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; </li>
</ul>
<span style="font-size: 14pt;">
<ul>
    <li>然后可以终端里到Eclipse下用不加参数命令&#8220;./eclipse&#8221;来启动，如果能启动起来，说明设置成功了。</li>
</ul>
<br>
<ul>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; 接着，就可以在桌面新建启动器了（右键——新建启动器）：</li>
</ul>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name:Eclipse<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command:/your/eclipse/dir/eclipse<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>
<ul>
    <li>&nbsp;&nbsp;&nbsp;&nbsp; 另外，在eclipse目录下，有相应的logo文件（icon.xpm），可以也载入，更加美观。</li>
</ul>
<br><br><br><span style="color: red;">提示：JVM是在jdk1.x.x-xx目录下的/bin目录下，而不是在jre/bin目录下。</span></span><br><br>   <img src ="http://www.cppblog.com/lateCpp/aggbug/144460.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lateCpp/" target="_blank">lateCpp</a> 2011-04-18 13:33 <a href="http://www.cppblog.com/lateCpp/articles/144460.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu中Gvim 不能输入中文</title><link>http://www.cppblog.com/lateCpp/articles/137760.html</link><dc:creator>lateCpp</dc:creator><author>lateCpp</author><pubDate>Thu, 30 Dec 2010 11:49:00 GMT</pubDate><guid>http://www.cppblog.com/lateCpp/articles/137760.html</guid><wfw:comment>http://www.cppblog.com/lateCpp/comments/137760.html</wfw:comment><comments>http://www.cppblog.com/lateCpp/articles/137760.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lateCpp/comments/commentRss/137760.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lateCpp/services/trackbacks/137760.html</trackback:ping><description><![CDATA[

<meta http-equiv="content-type" content="text/html; charset=utf-8"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 8.33333px; "><table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="rightcolor" style="word-break: break-all; font-size: 14px; text-decoration: none; color: rgb(0, 0, 0); background-image: url(http://www.sciencenet.cn/m/user_content.aspx?id=325692); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(244, 247, 246); table-layout: fixed; background-position: 50% 0%; "><tbody style="word-break: break-all; "><tr style="word-break: break-all; "><td align="left" valign="top" id="bcontent" style="word-break: normal; word-wrap: break-word; padding-top: 0px; padding-right: 18px; padding-bottom: 0px; padding-left: 18px; "><font style="word-break: normal; word-wrap: break-word; ">GVim突然不能输入中文了，在群里问都说是locale的问题。查看自己的locale：<br><br><div style="background-color: rgb(238, 238, 238); font-size: 13px; border-left-color: rgb(204, 204, 204); padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; "><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000; ">bob@bob</span><span style="color: #000000; ">-</span><span style="color: #000000; ">laptop:</span><span style="color: #000000; ">~</span><span style="color: #000000; ">$&nbsp;locale<br>LANG</span><span style="color: #000000; ">=</span><span style="color: #000000; ">en_US.utf8<br>LANGUAGE</span><span style="color: #000000; ">=</span><span style="color: #000000; ">en<br>LC_CTYPE</span><span style="color: #000000; ">=en</span><span style="color: #000000; ">_US.utf8<br>LC_NUMERIC</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_TIME</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_COLLATE</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_MONETARY</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_MESSAGES</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_PAPER</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_NAME</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_ADDRESS</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_TELEPHONE</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_MEASUREMENT</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_IDENTIFICATION</span><span style="color: #000000; ">=</span><span style="color: #000000; ">"</span><span style="color: #000000; ">en_US.utf8</span><span style="color: #000000; ">"</span><span style="color: #000000; "><br>LC_ALL</span><span style="color: #000000; ">=</span><span style="color: #000000; "><br></span></div>说明一下，在各个值中，最重要的是<span style="font-size: 12pt; ">LC_CTYPE，表示</span><span style="font-size: 19px;">locale中所使用的字符集（C是character的缩写）。<br></span><br>明白了这一点，就对症下药：<br><br style="word-break: break-all; ">首先：<br>sudo gedit /home/limy/.bashrc&nbsp; 在最后添加：LC_CTYPE="zh_CN.utf8，关闭。<br>其次：<br style="word-break: break-all; ">sudo gedit /etc/environment&nbsp; 在最后添加：LC_CTYPE="zh_CN.utf8，关闭<br>接着：<br style="word-break: break-all; ">sudo /var/lib/locales /supported.d/zh-hans，添加：<br style="word-break: break-all; ">zh_CN.UTF-8 UTF-8<br style="word-break: break-all; ">zh_SG.UTF-8 UTF-8<br style="word-break: break-all; ">zh_HK.UTF-8 UTF-8<br style="word-break: break-all; ">zh_TW.UTF-8 UTF-8<br style="word-break: break-all; ">zh_CN.GB2312 GB2312<br style="word-break: break-all; ">zh_CN.GBK GBK<br style="word-break: break-all; ">zh_CN.GB18030 GB18030<br style="word-break: break-all; ">最后将新设定的locale生成一下：<br style="word-break: break-all; ">sudo locale-gen<br style="word-break: break-all; "><br>可能需要重启才能看到效果。<br></font></td></tr><tr style="word-break: break-all; "><td style="word-break: normal; word-wrap: break-word; padding-top: 16px; padding-right: 18px; padding-bottom: 16px; padding-left: 18px; "><span style="font-size: 9.72222px; "><br></span>本文参考来源：&nbsp;<a href="http://www.sciencenet.cn/m/user_content.aspx?id=325692" style="word-break: break-all; color: rgb(5, 78, 114); ">http://www.sciencenet.cn/m/user_content.aspx?id=325692</a><br><br><meta http-equiv="content-type" content="text/html; charset=utf-8"><span style="font-size: 6.25px; "><table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="rightcolor" style="word-break: break-all; font-size: 14px; text-decoration: none; color: rgb(0, 0, 0); background-image: url(http://www.sciencenet.cn/m/user_content.aspx?id=325692); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(244, 247, 246); table-layout: fixed; background-position: 50% 0%; "><tbody style="word-break: break-all; "><tr style="word-break: break-all; "><td align="left" valign="top" id="bcontent" style="word-break: normal; word-wrap: break-word; padding-top: 0px; padding-right: 18px; padding-bottom: 0px; padding-left: 18px; "><font style="word-break: normal; word-wrap: break-word; ">另：</font></td></tr><tr style="word-break: break-all; "><td style="word-break: normal; word-wrap: break-word; padding-top: 16px; padding-right: 18px; padding-bottom: 16px; padding-left: 18px; "><span style="font-size: 12pt; ">虽然最终可以输入中文了。但是之前这一项的值为&#8220;en_US.utf8&#8221;也能输入，是最近几天才不能输入中文的。——所以总不大明白问题出在哪儿。</span></td></tr></tbody></table></span></td></tr></tbody></table></span>
<img src ="http://www.cppblog.com/lateCpp/aggbug/137760.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lateCpp/" target="_blank">lateCpp</a> 2010-12-30 19:49 <a href="http://www.cppblog.com/lateCpp/articles/137760.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>