Java Scripting Hook

for Liferay

Use plain old Java language to write portal admin scripts


java-scripting-hook add support for the plain old Java language as scripting language in the Liferay script console.
Now, you can write your portal admin scripts in your daily language, with your prefered IDE.


This plugin may help you in some cases :

  • if you are not familiar with any of the script languages natively supported by Liferay (Beanshell, Javascript, Groovy, Python and Ruby)
  • if you want to enjoy auto-complete from your IDE, incredibly improving your productivity
  • if you have already the code to execute in java language (from some portlet source code for example), to save the time to translate your code snipet to a natively supported script language
  • if you need, during development, to quickly test java code snippet on any server (other than your development server).

Try it out!

Download from Sourceforge:

Last release for Liferay 6.1 GA2
java-scripting-hook- (2013-02-25)
Last release for Liferay 6.1 GA1
java-scripting-hook- (2012-05-19)
Last release for Liferay 6.0
java-scripting-hook- (2012-05-27)

View all releases (since august 2011)

Use RSS to monitor new releases

Spread the word

import com.liferay.portal.service.*;

class UsersCount {
  PrintWriter out;
  void execute() throws Exception {
    int number = UserLocalServiceUtil.getUsersCount();


Get more samples


You can help by giving me feedback: report bugs, suggest new features or just encourage me!