post Java source code in WordPress

I encountered issue to post java code on word press site.
I was about to first time post a source code in my blog.How will I post Java source code in WordPress? so here is the answer. And I believe that most of the blog sites today can support different programming languages. I will show how to sample code post on blog.

Note that This sample is effective only in WordPress.

1. Add Alex Gorbatchev’s SyntaxHighlighter plugin.
2. write like this

your code here

Remove comma’s.

Exapmle.

public class Test {
	public static void main(String[] args) {
		System.out.println("Hello world");

	}

}

3. The following languages are supported:

actionscript3
bash
clojure
coldfusion
cpp
csharp
css
delphi
erlang
fsharp
diff
groovy
html
javascript
java
javafx
matlab (keywords only)
objc
perl
php
text
powershell
python
r
ruby
scala
sql
vb
xml
If the language parameter is not set, it will default to “text” (no syntax highlighting).

4. More information read http://en.support.wordpress.com/code/posting-source-code/” title=”http://en.support.wordpress.com/code/posting-source-code/

The following two tabs change content below.
He is founder and CTO of Habilelabs.io. He senior software architect. He is guru of various Mobile and web technologies including Node.js, Angular.js, Meteor.js. He is founder member of habilelabs Pvt. Ltd.