java decompilers

Because I have no recent Backup of the big java project I was working I have to decompile the class Files that are in this jar.
I found 3 different java decompilers for mac os x.

  1. MacJAD (google for Download)
    – onyl able to open single class files
  2. JarInspector (http://www.codeland.org/)
    + can open jar files
    + correct 
    – unable to decompile the anonymous inner classes I use
    – seems to be confused by nested catch and try blocks 
  3. JD-GUI (http://java.decompiler.free.fr/)  
    + can open jar files
    + 90% able to decompiling anonymous inner classes

A big problem all tools share is that if you have nested iterations, for/while loops they all rename the variable you iterate over to ‘i$’. So it’s possible if your code looks like this:

while(iterator.hashNext()) {
...
    for(int varA; ....){
        for(int varB; ....){.....}
    }
...
}

the decompiled code will end up looking this:

while(i$.hashNext()) {
...
    for(int i$; ....){
        for(int i$; ....){.....}
    }
...
}

which isn’t really funny …

My conclusion is that JarInspector seems to be the best but if you need the inner class support use JD-GUI for the parts of the code those are in.

iMac news

I stoped working yesterday and didn’t try this comercial diskW*** i thought that would be free.
doesn’t look good for my loved iMac, HardDrive doesn’t get detected in FireWire Target mode. Now he’s at the Apple Service provider. I hope I’ll soon get the call that most of the data could be recovered and averything will be fine ….
Meanwhile I’m trying recover the data I could save….

at least the next week I think I’ll only get a mocca cup of sleep ;(

BibTeX and LaTeX in TeXShop OS X

  1. create a file (e.g. cites.bib) that will contain the cites
  2. create a cite in cites.bib (you may use http://www.interaction-design.org/citation-maker/ as the simple solution)
    e.g.

    @misc{bibAndTex,
      AUTHOR = {cb0},
      TITLE = {BibTeX and LaTeX in TeXShop OS X},
      PUBLISHER = {cb0},
      ADDRESS = {Leipzig},
      YEAR = {2009},
    URL = {http://0xcb0.wordpress.com},
    note = {This is an electronic document. http://0xcb0.wordpress.com
               Date retrieved: Feburay 22, 2009. Date last modified: Feburay 22, 2009},
    url = {http://0xcb0.wordpress.com},
    }
  3. Insert the following 2 lines at the desired place of your bibliography
    \bibliography{cites}{}
    \bibliographystyle{plain}

    cite is the reference to the created cites.bib

  4. cite it somewhere
    \cite[see cb0's Blog]{bibAndTex}
  5. Save all changes
  6. set Latex
    bild-1
  7. set BibTeX
    setbib
    output should start with sth. like this
    bild-3
  8. 2 times step 6 for correct numbering of all cites
  9. look at the results
    citeintext
    the cite in the text

    bibliography
    the cite in the bibliography
  10. enjoy