liferay portal 在tomcat调试

转自:https://web.liferay.com/de/community/wiki/-/wiki/Main/Eclipse+Debugging+Liferay+on+Tomcat#section-Eclipse+Debugging+Liferay+on+Tomcat-(Older+versions)+With+a+straightforward+launch+configuration

 

Using a Launch Configuration specifically created to run Tomcat directly, bypassing Eclipse.

  1. Open "Run Configurations..." under the Run button
  2. Under Java Applications node in the tree, right click and "New"
  3. On Main tab, select the portal source code project or your EXT project
  4. In the Main class put org.apache.catalina.startup.Bootstrap, don't check any check boxes
  5. Go to Arguments tab, in the Program arguments type: start
  6. In VM arguments put like:

这里的参数 

-Xmx2600M

-XX:PermSize=128M

-XX:MaxPermSize=512M

-Xmx512m
-XX:PermSize=32m
-XX:MaxPermSize=160m
-Dfile.encoding=UTF8
-Duser.timezone=GMT
-Djava.security.auth.login.config=${tomcat-root-folder}/conf/jaas.config
-Dcatalina.base=${tomcat-root-folder}
-Dcatalina.home=${tomcat-root-folder}  
-Djava.io.tmpdir=${tomcat-root-folder}/temp

Optional If you want to retain the tomcat logging settings include the following arguments.

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=${tomcat-root-folder}/conf/logging.properties

Change ${tomcat-root-folder} to point at your tomcat deployment root folder

  1. In the Working directory, make it: Other: ${tomcat-root-folder}/bin. Again, change ${tomcat-root-folder} accordingly
  2. In Classpath tab, remove ALL User entries, do NOT remove the JRE System library
  3. Select User Entries and "Add External JArs", find the bootstrap.jar file from the ${tomcat-root-folder}/bin folder and add only that one
  4. In the Source tab, select any related project, but also the main project. For example, if you want to also debug a plugin, add it's source path here
  5. Under Common tab check Run and Debug
  6. Apply all changes
  7. Now whenever you want to debug, just go to the debug button/drop down and click. The server should startup on console.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值