Archive | August, 2006

Vim – search and replace

28 Aug

:%s/\(.*\):/<font color='blue'>\1:/g

This is better:

  :g/:/s/^/<font color='blue'>

"for each line containing a colon, do this s/// operation".
(And you don't need the trailin /g.)

Vim – delete all lines containing.

28 Aug

Delete all lines containing a certain thing:

:g/needle/.,.d          : Delete line where 'needle' is found
:g/needle/.-10,.d     : Delete string & 10 previous lines

 

Jbuilder and ‘endorsed’

10 Aug

You can set your classpath to take notice of particular libraries first using the "-Djava.endorsed.dirs=C:\classpath" switch.

 To do this in JBuilder, add it to Project->Project Properties->Run->VM Parameters

Jbuilder and ILOG Jlmdeploy

9 Aug

I was getting the error: "ILOG deployer error: ZIP file must have a least one entry" when i tried to run jlmdeploy on a jar.

Jlmdeploy is ILOG's program to sign jar's for distribution.

This was a Jbuilder specific problem.

JBuilder for some reasons adds a couple of files to a jar when it builds an archive : It adds META-INF/SUN_MICR.RSA and META-INF/SUN_MICR.SF which are some sort of signature for applets.

 To fix I simply created those files under src/META-INF as empty files.