技巧一

一.远程debug

 

1.在catalina.sh中,添加下面变色部分:

fi
CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
if [ "$1" = "debug" ] ; then

 

2.在eclipse中debug按钮的下拉列表的Remote Java Applicataion创建一个新的连接远程linux的连接

   Connection type:Standard(Socket Attach)      Host:10.129.148.46     Port:8000

 

二.修改java方法内的东西不用重启

 

1.Web Modules 的项目设置为Disabled
2.把jrebel-3.0-M1放到D盘下(可以是任意一个路径,与下面统一就行)
3.-Xms256m -Xmx256m -XX:MaxNewSize=256m -XX:MaxPermSize=256m -noverify -javaagent:D:\jrebel-3.0-M1\jrebel.jar -Drebel.struts1-plugin=true
4.dubug模式启动

 

三.Eclipse中类的反编译

1.将jad.exe拷到jdk的bin下面
2.D:\eclipse\eclipse\plugins目录下放置net.sf.jadclipse_3.3.0.jar包

 

四.linux中起别名

编辑 /etc/bash.bashrc
在其最后插入 alias log='tail -f /home/zxin10/was/tomcat/logs/catalina.out'

 

五.linux中加入环境变量

编辑 /etc/bash.bashrc

在其最后插入PATH=/home/zxin10/mongodb/bin:$PATH

 

六.查看端口占用

xp查看端口占用:netstat -ano|findstr 8080
linux查看端口占用:lsof -i:80     ps -ef|grep 80

 

七.oracle数据的导入导出

 

数据导出:
 1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中
   exp system/manager@TEST file=d:\daochu.dmp full=y
 2 将数据库中system用户与sys用户的表导出
   exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
 3 将数据库中的表inner_notify、notify_staff_relat导出
    exp aichannel/aichannel@TESTDB2 file= d:\datanewsmgnt.dmp tables=(inner_notify,notify_staff_relat)
 4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
   exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=" where filed1 like '00%'"
 对于压缩后面 加上 compress=y 来实现。

 

数据的导入
 1 将D:\daochu.dmp 中的数据导入 TEST数据库中。
   imp system/manager@TEST  file=d:\daochu.dmp
   imp aichannel/aichannel@TEST  full=y  file=d:\datanewsmgnt.dmp ignore=y
   上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。在后面加上 ignore=y 就可以了。
 2 将d:daochu.dmp中的表table1 导入
 imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)

 

八.ascii与中文的互换

将中文译为ascii码:   打开命令行窗口-->输入命令 native2ascii
将ascii码转为中文:   打开命令行窗口-->输入命令 native2ascii -reverse

 

 

九.eclipse安装插件

再elclipse文件夹下的dropins下面建立随便一个如jad的文件夹,再这个jad的里面建立features和plugins文件夹,放入相应的jar包即可,其中features和plugins是固定名称,jad可以随便取

 

十.idea热部署

1.debug模式启动

2.tomcat 里面on frame deactivation设置为update classes and resources

 

十一.idea内存溢出

内存溢出idea在tomcat debug添加参数:catalina_opts=-Xms512m -Xmx512m

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值