9

I'm not sure if this is the absolute best place to ask, but I think there's highest probability of an answer here (because of the topic).

Has anyone came across a mobi (Amazon Kindle) version of Java Language Specification? I know I can read PDFs on Kindle but it's less of an experience compared to mobi.

http://docs.oracle.com/javase/specs/

Vadzim
  • 24,954
  • 11
  • 143
  • 151
Mike Minicki
  • 8,216
  • 11
  • 39
  • 43
  • You can convert the PDF to Kindle-compatible Mobi with [Calibre](http://calibre-ebook.com/). Hopefully the PDF is just plain text so it allows for reflow (which it probably is). – wkl May 05 '12 at 14:29
  • Thanks, @birryree, but I have tried that already and the result is not good, unfortunately. – Mike Minicki May 05 '12 at 14:31
  • Try programmers.stackexchange.com next time for these kind of questions Michal! Flagged for transfer. – Maarten Bodewes May 05 '12 at 14:32
  • 2
    @owlstead I don't think the question has much to do with programming at all. It's about how to convert HTML or PDFs so that they're nicely readable on the kindle. Seems more fit to superusers. – Voo May 05 '12 at 14:35
  • @Voo: nah, it's programmer**S**, so it is probably on topic there, and superusers certainly won't have such a book laying around in any version. – Maarten Bodewes May 05 '12 at 14:37
  • @owlstead I doubt such a book exists, so I think the question should be more how to convert the existing sources (html, pdf) into a good readable format - which doesn't fit either SO nor programmers very much. But on second glance that's a bit interpretative of the question. – Voo May 05 '12 at 14:59
  • @Voo: I think you are on the right track. The question was if anybody has come across such a book though, so the question is more for programmers but the answer is more likely to be found on superusers :) – Maarten Bodewes May 05 '12 at 15:04
  • Thanks for hinting a more fitting place, @owlstead. But as nobody answered yet, then the book in this format probably doesn't exist anyway. So, I think I'm going to delete the question if it's such a violation of rules. Thanks guys. And no, I didn't want to convert - I wanted a well formatted mobi. It's still better to read in PDF than badly reflowed mobi. – Mike Minicki May 07 '12 at 07:22
  • http://www.oracle.com/technetwork/java/javase/downloads/java-se-7-tutorial-2012-02-28-1536013.html Are the mobi files on oracle.com –  Jun 15 '12 at 18:05
  • 1
    Unfortunately, that's not the java language specification but a tutorial for java. – evnu Jun 15 '12 at 21:13

1 Answers1

12

The steps i used to get the JLS into my kindle with the pretty good result:

1) Download JLS in the HTML format with the help of some site downloader.

I used HTTrack (settings: initial url is http://docs.oracle.com/javase/specs/jls/se7/html/index.html, default "preferences and mirror options" except for "build"/"local structure type", which i set to "html in web/, images/others in web/").

The result should be something like a directory with 25 html files, 1 css and 1 image file, and the links inside the html files should be properly relativized.

2) Edit the css file to remove some formatting that will not look good on Kindle (absolute layouts, excessive left and right margins). I simply commented out "div.chapter div.toc", "div.chapter", "ol li" and "ul li" sections and left everything else as is.

3) Use Calibre to convert this set of files into mobi.

The resulting mobi flows nicely and so far all internal links work as expected.

Oleg Estekhin
  • 8,063
  • 5
  • 49
  • 52