24

I am looking for Java-based Less CSS compilers. On Github, I have stumbled across

  • lesscss4j
  • lesscss-java

Both are from the same developer. Unfortunately I cannot quite figure out the difference between them.

Can somebody tell me? Which other compilers do you know?

3
  • 1
    Look inside PlayFramework 2, there is a Less compiler included. Mar 17, 2012 at 19:40
  • 3
    Looks to me like lesscss4j was the old name for the project, lesscss-java the new name.
    – cchana
    Mar 22, 2012 at 9:40
  • 1
    Yes, that's right. Meanwhile I got an answer from the developer who confirmed that.
    – Windwalker
    Mar 22, 2012 at 13:46

6 Answers 6

8

The Official LESS CSS Compiler for Java is pretty nice, too. It's in Maven Central, is thread safe (so performance is pretty good), and it's got an easy to use interface.

1
  • 5
    How is this compiler more official than the LESS Engine @codelark mentions in his answer? I don't so neither linked on lesscss.org. Oct 5, 2012 at 14:32
6

LESS Engine wraps the javascript compiler in a straight-forward Java interface.

I haven't used lesscss-java, so I can't comment on relative quality, but in the small tasks I've needed, I've had no complaints with Less Engine.

1
  • I've been using it, and it worked pretty well. The lesscss-maven-plugin did not work very well for me, so I made a FileWatcher with this that compiles the files when something changes.
    – digao_mb
    Mar 4, 2015 at 14:21
4

JLessC is an alternative less compiler. It is pure Java and does not use any JavaScript engine. The main target is use together with Bootstrap. It is very fast.

2

lesscss4j is a Java compiler, written with ANTLR. While this will be faster, the problem is that you need to synchronise it with the official lesscss compiler which is in javascript. This project hasn't been touched for 2 years. Lesscss-java is a wrapper around the official compiler and is running in Rhino JS engine. It used by the popular Lesscss-maven-plugin.

2

LessCSS Compiler - compatible with version 1.7.5. The library is based on the official Less JavaScript compiler adapted to the Rhino engine.

It supports sources located at:

  • local drives
  • protocols:
    • HTTP and HTTPS
    • FTP (requires Apache Commons Net library in the class path) & class path (prefix classpath://)
    • custom - defined by programmers (see FileSystem)

The library requires Java 8.

0

If you are working with atlassian plugins and in addition to the already mentioned lesscss-maven-plugin you might also have a look at a (non-open-sourced) derivate from atlassian repository https://maven.atlassian.com/content/repositories/atlassian-public

<plugin>
    <groupId>com.atlassian.lesscss</groupId>
    <artifactId>lesscss-maven-plugin</artifactId>
</plugin>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.