Tuesday, July 2, 2013

configure linux tomcat for jpda debugging and rmi management through intellij

create/modify setenv.sh and add the following entries

JAVA_HOME=/usr/java/default

CATALINA_OPTS="-Dcom.sun.management.jmxremote\
   -Dcom.sun.management.jmxremote.port=13091\
   -Dcom.sun.management.jmxremote.ssl=false\
   -Dcom.sun.management.jmxremote.authenticate=false\
   -Djava.rmi.server.hostname=localhost\
   -javaagent:/intellijsharedlibs/groovyhotswap/gragent.jar
   -Xdebug -Xrunjdwp:transport=dt_socket,address=54391,suspend=n,server=y"

JPDA_OPTS="-Xrunjdwp:jdwp=transport=dt_socket,address=54391,server=y,suspend=n"

JAVA_OPTS="$JAVA_OPTS \
   -XX:+CMSClassUnloadingEnabled  \
   -XX:+UseConcMarkSweepGC \
   -XX:MaxPermSize=1024m \
   -XX:PermSize=512m \
   -Djavax.net.ssl.trustStore=$pathtokeystore \
   -Djavax.net.ssl.trustStorePassword=changeit"

Monday, July 1, 2013

remote debug a locally hosted tomcat instance on intellij

tomcat:
open tomcat's service manager and go into the java tab

configure jdwp to use intellij settings. this will enable intellij to publish artifacts into tomcat make sure each directive is in its own line

-Xdebug
-Xrunjdwp:transport=dt_socket,address=54312,suspend=n,server=y
-javaagent:C:\Users\uye\.IntelliJIdea12\system\groovyHotSwap\gragent.jar

configure rmi and debugging
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=fxdms-hp

intellij:
create a new remote tomcat server
under the server tab, configure and pick tomcat's binaries
set jmx port to 1099
set remote staging>type to Same file system
under remote connection settings set host to localhost and port to 8080

Wednesday, May 1, 2013

cure all file and folder execute permission without using 777

chmod -R g+wrx

Wednesday, April 25, 2012

install telnet in windows 7 and up

pkgmgr /iu:"TelnetClient"

Friday, March 2, 2012

force maven to download dependencies

dependency:tree

Friday, February 24, 2012

tomcat not finding maven-project dependency

Right Click on your web project in Project Explorer -> select 'Properties'. Under project properties, select 'Deployment Assembly'.

The Deployment Assembly property page shows the content that will be published as a assembled artifact by Eclipse to the server. You need to tell Eclipse that you want all your Maven dependencies to be published too.

To do that, click 'Add' button, then select 'Java Build Path Entries'. Click Next and select Maven Dependencies. This will publish the Maven dependency JAR files to the lib folder when Eclipse publishes your project to WST server.

Thursday, February 23, 2012

good development tools to have

eclipse plugins
- quantum db plugin
- subversive svn plugin
- checkstyle w/sun profile
- spring ide
- jboss hibernate tools plugin
- maven plugin
- regex util
- apache directory studio
- google plugin
- springsource tools
- eclipse color theme
- m2e-android

other tools
- tortoise
- notepad++
- winmerge (folder compare)
- free download manager
- greenshot (screen capture)