远程调试 :
调试,运行 都有了
不过还有些 jdb 的一些命令 还有待完善 ..
Mymvn(run_type)
let filepath = getcwd()."/".expand("%ht")
let src = substitute(filepath,'.*\(src/.*/java\)/.*\.java','\1','g')
let proj = substitute(filepath,'\(.*\)src/.*/java\/.*\.java','\1','g')
let class_path = substitute(filepath,'.*src/.*/java/\(.*\)\.java','\1','g')
let class_run = substitute(class_path,'/','\.','g')
if a:run_type == 'javac'
execute "!cd ".proj.";mvn compile"
endif
if a:run_type == 'java' execute "!cd ".proj.";mvn exec:java -Dexec.mainClass='".class_run."'" endif
if a:run_type == 'jdb' execute "!echo '>> stop at ".class_run.":".line('.')."'" execute "!cd ".proj.";mvn exec:exec -Dexec.executable='jdb' -Dexec.args='-sourcepath ".src." -Xdebug -Xnoagent -Djava.compiler=NONE -classpath \\%classpath ".class_run."'" endif
endfunction
map <F5> :call Mymvn('javac')<CR>
map <F6> :call Mymvn('java')<cr>
map <F7> :call Mymvn('jdb')<cr>
|
看看 可以添加
export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9991 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.access.file=/home/hadoopmc/jmxremote.access -Dcom.sun.management.jmxremote.password.file=/home/hadoopmc/jmxremote.password -Dcom.sun.management.jmxremote.ssl=false $HADOOP_JOBTRACKER_OPTS"
阅读(2260) | 评论(1) | 转发(0) |