dp.SyntaxHighlighter 1.5.0 Tests and Samples

http://code.google.com/p/syntaxhighlighter/

Java

Languages:

  1. C#
  2. CSS
  3. C++
  4. Delphi
  5. Java
  6. JavaScript
  7. PHP
  8. Python
  9. Ruby
  10. SQL
  11. Visual Basic
  12. XML / HTML

Features:

  1. Smart tabs
  2. First line
  3. Expand code
  4. Show columns
  5. No gutter
  6. No controls
Text body before.
package us.prokhorenko.jx;
import us.prokhorenko.jx.Person;
import org.exolab.castor.xml.*;
import java.io.*;
import java.util.*;

public class Test {
	public static void main(String args[]) {
		try {
			/***********************************
			 ** Multiline block comments
			 **********************************/
			
			string stringWithUrl1 = "http://blog.dreamprojections.com";

			// Marshalling class to XML
			
			// Create the Person class
			Person person = new Person("Mr. White", "mr@white", "626-555-1234");
			
			// Marshal and save to XML file
			FileWriter file = new FileWriter("person.xml");
			Marshaller m = new Marshaller(file);
			m.marshal(person);
			file.close();
			
			// Unmarshalling XML to class
			
			// Read from XML and unmarshal
			FileReader uFile = new FileReader("person.xml");
			Unmarshaller u = new Unmarshaller();
			Person uPerson = (Person)u.unmarshal(Person.class, uFile);
			
			// Show name and email
			System.out.println("name: " + uPerson.getName());
			System.out.println("email: " + uPerson.getEmail());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

Text body after.