`
文章列表

Linux常用命令积累

1. 切换当前目录到某个文件夹: cd /opt/webhost/pn/log    切换到上层目录:cd .. 2. 查看某个文件的最后N行:tail -100 JSP_ClientInterface.20130302.235622.log 3. 查看进程CPU使用率:top -h 4. 查看tomcat是否启动    ps -ef | grep java 5. 查看apache是否启动    ps -ef | grep httpd 6. 清空文件内容    a. vi 该文件,在命令模式下,输入dG, 然后保存:wq    b. echo "" > 文件 ...
package com.hp.pn.service; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.net.HttpURLC ...

PuTTY使用

1. 删除:shift+backspace 2. 返回命令输入行:ctrl+c
找到oracle安装目录如:C:\app\yfan\product\11.2.0\client_2 找到一下文件: \product\11.2.0\client_2\network\admin\tnsnames.oRA 内容: PNET_ITG =   (DESCRIPTION =     (SDU = 32768)     (enable = broken)     (LOAD_BALANCE = yes)     (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1525))     (ADDRESS = (PROTOCOL = TCP)(HOST ...
要删除的文件必须存在且是一个文件夹,可以根据自己的需求,在调用该方法前或该方法中加入自己的需求验证 // remove a folder including all directories and files in this folder private void deleteOneFolder(File dirFile) { File[] tempFileArr = dirFile.listFiles(); for (File perFile : tempFileArr) { if (perFile.isDirectory()) { ...
生成XXX.tar.gz压缩文件有两种方式,可以先打包后压缩,还可以打包压缩同时进行。 所用到的jar包见附件,若用maven,pom.xml文件内容如下: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd ...
参考网址:http://blog.csdn.net/weaponofpower/article/details/8753394 import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; import org.apache.commons.compress.utils.IOUtils; <project xmlns="http:// ...
转自: http://xianguiquan.iteye.com/blog/1506572 错误3: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project web_nanchang: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1 ...
samba安装: 检查安装了samba:rpm -qa | grep samba 在光盘(redhat系统安装盘)中查找samba的rpm文件路径:[root@yangfan /]# find -name samba* 按顺序安装samba的rpm文件: [root@yangfan Packages]# rpm -ivh samba-3.5.10-125.el6.x86_64.rpm warning: samba-3.5.10-125.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY error: ...
package d20130406; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; ...
转自: http://stackoverflow.com/questions/1190837/java-xmx-max-memory-on-system The limit for -XmX is -Xmx1500m on 32 bit windows. Shared libraries get in the way of a bigger heap. You'll need about 2Gb of RAM to do this. On non-windows OSes you can go bigger, and 64Bit JVM's are capable of a LOT more ...

tomcat配置文件

转自: http://www.cnblogs.com/smile361/archive/2013/01/30/2883315.html <Server port="8005" shutdown="SHUTDOWN"> <!--属性说明 port:指定一个端口,这个端口负责监听关闭Tomcat的请求 shutdown:向以上端口发送的关闭服务器的命令字符串 --> <Listener className="org.apache.catalina.core.A ...
转自: http://www.cnblogs.com/xwdreamer/archive/2011/11/21/2296930.html 1.报错: Exception in thread "DispatcherThread" java.lang.OutOfMemoryError: PermGen space Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space Excep ...
转载: http://www.cnblogs.com/hzj-/articles/1689836.html <context-param>的作用: web.xml的配置中<context-param>配置作用 1. 启动一个WEB项目的时候,容器(如:Tomcat)会去读它的配置文件web.xml.读两个节点: <listener></listener> 和 <context-param></context-param> 2.紧接着,容器创建一个ServletContext(上下文),这个WEB项目所有部分都将共享这个上 ...
1. Windows下安装虚拟机VM后,window下的文件不能复制到VM中,可以添加共享文件夹解决,并安装VMware Tools. 点击VMware菜单的——虚拟机——安装VMware Tools,在弹出的对话框中选择“安装”。这时,在Ubuntu下会自动加载Linux版的VMware Tools的安装光盘镜像。你会看到虚拟机的桌面上出现了一个名为VMware Tools的光盘图标,并且被自动打开。其中包括VMwareTools-5.3.3-34685-i386.rpm和VMwareTools- 5.3.3-34685.tar.gz两个文件。 .rpm文件是给Red Hat准备的,我们只 ...
Global site tag (gtag.js) - Google Analytics