<< IBM Developer Kit-In-A-Box - Composite Application | Home | LotusLive annoucements - available in Danish plus some other nice stuff >>

Java class line numbers for plugin developers

If you've been tasked with developing and/or debugging Java extensions for the Notes 8 client you know that line numbers has been missing from the stacktraces produced by Notes. This can be a real problem when trying to debug stuff in a production client. There has been some discussion among the ones of us developing these extensions on how to enable these line numbers. The other day this information was provided by Srinivas Rao of IBM and I wanted to publish it here for all to read.

Line numbers are removed from the classes added to the shared class cache to reduce the memory needed for the memory mapped classes. To re-enable the line numbers, one needs to edit the <notes>\framework\rcp\deploy\jvm.properties file and add comment out the ignorelinenumbers vm argument. However, if the classes have already been added to the JVM shared class cache, then they will have been added without line numbers. Either comment out the shared class cache (which will dramatically affect performance at startup) for temporary work, or shutdown notes and remove the shared class cache so that it can be repopulated with classes with line numbers. Of course, this will also affect the startup performance, but not so much as not having a cache These are two of the key lines ... to comment them out, add a # to the front of the line

vmarg.Xnolinenumbers=-Xnolinenumbers
vmarg.Dshare=-Xshareclasses:name=xpdplat_.jvm, **line cont**
   controlDir=${prop.jvm.shareclasses.loc}, **line cont**
   groupAccess,keep,singleJVM,nonfatal
jvm.shareclasses.loc=${rcp.data}/.config/org.eclipse.osgi
The shared class cache is typically located in the data/workspace/.config/org.eclipse.osgi



Re: Java class line numbers for plugin developers

Thanks! Most useful Notes development tip I've seen anywhere in a long time.

Add a comment Send a TrackBack