# Plugin for displaying Java Code with Syntax Highlighting in a RoR website?

**URL:** <https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655>\
**Category:** Rails\
**Created:** [May 5, 2008, 9:37am UTC](https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655 "2008-05-05T09:37:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pel](https://www.ruby-forum.com/u/pel)\
**Post date:** [May 5, 2008, 9:37am UTC](https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655/1 "2008-05-05T09:37:00Z")

</div>

Hello folks,

I only want to display (not execute) java code on a java tutorial  
website coded in RoR. Is there any plugin or method how i can display  
the java code with syntax highlighting on a RoR html site?

---

<div class="post-metadata">

**Author:** ![pel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pel](https://www.ruby-forum.com/u/pel)\
**Post date:** [May 5, 2008, 11:15am UTC](https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655/2 "2008-05-05T11:15:16Z")

</div>

On 5 May 2008, at 08:36, Pel wrote:

> Hello folks,
> 
> I only want to display (not execute) java code on a java tutorial  
> website coded in RoR. Is there any plugin or method how i can display  
> the java code with syntax highlighting on a RoR html site?

Ultraviolet ([http://rubyforge.org/projects/ultraviolet/](http://rubyforge.org/projects/ultraviolet/)) can syntax  
highlight java among other things.

Fred

---

<div class="post-metadata">

**Author:** ![pel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pel](https://www.ruby-forum.com/u/pel)\
**Post date:** [May 5, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655/3 "2008-05-05T15:21:28Z")

</div>

surround it with HTML pre tags [?]

```
code
```

---

<div class="post-metadata">

**Author:** ![pel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/34f0e0/32.png) [@pel](https://www.ruby-forum.com/u/pel)\
**Post date:** [May 5, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/plugin-for-displaying-java-code-with-syntax-highlighting-in-a-ror-website/136655/4 "2008-05-05T22:09:28Z")

</div>

Another option, might be easier to integrate and/or maintain:  
[http://code.google.com/p/syntaxhighlighter/](http://code.google.com/p/syntaxhighlighter/)
