Osp*_*pho 14 java eclipse ubuntu tomcat tomcat7
我正在尝试在ubuntu中为Tomcat7设置JPDA.
我使用了apt-get方法安装Tomcat7.
通过尝试使用以下行编辑/usr/share/tomcat7/startup.sh文件,我尝试让tomcat7启动到调试模式并允许通过eclipse进行远程调试.
JPDA_TRANSPORT="dt_socket"
JPDA_ADDRESS="8000"
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"
Run Code Online (Sandbox Code Playgroud)
编辑startup.sh文件后,我使用以下命令重启tomcat7:
sudo service tomcat7 restart
Run Code Online (Sandbox Code Playgroud)
然后尝试使用IP地址和端口8000连接到eclipse中的tomcat jpda.我从Eclipse收到"Connection Refused"错误.
我试图使用startup.sh脚本而不是服务可执行方法手动启动tomcat7,因为我认为可能没有调用startup.sh.
sudo ./startup.sh
Run Code Online (Sandbox Code Playgroud)
这失败,输出如下:
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
./catalina.sh: 389: ./catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent
Run Code Online (Sandbox Code Playgroud)
我也试图改变/etc/init.d/tomcat7的启动脚本,因为我使用服务来启动/重启tomcat7无济于事...
我究竟做错了什么?
Dav*_*que 36
在Ubuntu 12.04+中有一个这样的部分/etc/default/tomcat7:
# To enable remote debugging uncomment the following line.
# You will then be able to use a java debugger on port 8000.
#JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
Run Code Online (Sandbox Code Playgroud)
所以只需取消注释并运行即可sudo service tomcat7 restart.
| 归档时间: |
|
| 查看次数: |
12240 次 |
| 最近记录: |