rikkiprince / CompileInMemory

A Java library for compiling source code entirely in memory, using JDK 1.6 or later.
0 stars 0 forks source link

Markdown #1

Open Spacerat opened 13 years ago

Spacerat commented 13 years ago

Try renaming your readme to readme.markdown, then adding newlines before all blocks of -. It'll look something like....

Compile In Memory

Rikki Prince - rikki@prince.io

Prerequisites

Code influenced by examples on the web, which now seem to have disappeared. URLs for original source are in the code comments.

This code was altered and simplified from the example code referenced, to make it into this usable library.

File Summary (in order of usefulness!)

MemoryCompiler.java

CompileTest.java

ClassNameNotFoundException.java

CompilerNotAccessibleException.java

JavaSourceFromString.java

MemoryFileManager.java

MemoryClassFile.java

MemoryClassLoader.java

LoopCompiler.java

Order of Operations

  1. Call MemoryCompiler.compile(String sourceCode, String className).
  2. This creates a new JavaSourceFromString object.
  3. Creates an Iterable list of JavaFileObjects called "compilationUnits".
  4. compilationUnits is passed to the compiler.getTask() method, along with the MemoryFileManager.
  5. CompilationTask is call()ed.
  6. A new MemoryClassLoader is created from the updated FileManager.
rikkiprince commented 13 years ago

Yeah, I realised that. I filled in all the markdown, and it didn't work, so I went to investigate, and found out that I needed to name it README.md. But then I decided that most people won't understand what a .md file is, and get confused, and not confusing people was more important to me than making my readme look nice on Github.

If Github wanted to be clever, they could detect whether I'm using markdown from the content...