[Haskell-cafe] The best way to call Java from Haskell?
michael at snoyman.com
Tue Oct 11 08:23:55 CEST 2011
Perhaps my needs are unique here, but I thought I'd mention them
anyway. The main tool we use at work is based on a hodge-podge of
Java, Ant and XSLT code. This thing has to be constantly extended
to support new functionality (or fix one of its myriad bugs), and
there's no technical hurdle to using Haskell to that end. In fact, my
company has released a few packages specifically in this
There are two problems, however:
* Some clients have an insistence that code run on the JVM.
* It's inconvenient having multiple executables. Additionally, I've
run into some problems in the past deploying to ancient Linux
So for my use case, I don't care at all about interacting with Java
code, I simply want to be able to turn my existing Haskell code into a
JAR file. This seems like a much simpler undertaking, but I'm still
not aware of any way to get this to happen right now either.
On Tue, Oct 11, 2011 at 8:15 AM, JP Moresmau <jpmoresmau at gmail.com> wrote:
> I had started a project to start a JVM and call Java code from
> Haskell, but got sidetracked into EclipseFP, but I hope to go back to
> it someday.
> https://github.com/JPMoresmau/HJVM. Have a look at the test suite for
> some examples.
> Hope this helps
> On Tue, Oct 11, 2011 at 7:20 AM, Aatch <bladeon at gmail.com> wrote:
>> There are some projects to try and provide a bridge between Haskell
>> and the JVM. Unfortunately none of the seem to have much development.
>> As it stands, there is GCJNI, which allows Haskell to invoke Java
>> code, seems like a Java version of hsc2hs, but the site is down, it
>> just 404s. There is also haskell-jvm-bridge, but that doesn't look
>> like it has any development for about 18 months, and there isn't much
>> about it. Then there is LambdaVM, which looks the most promising, as
>> it compiles GHC byte-code to JVM bytecode. However, it doesn't look it
>> has been updated in a few years.
>> You can try your luck with any of those, but currently, if you want a
>> decent FFI for Java, you're probably going to have to resurrect one of
>> those projects.
>> James Miller
>> On 11 October 2011 15:26, Claude Lee <calee2005 at gmail.com> wrote:
>>> Theoretically, you can bridge Haskell and Java with FFI. It applys to small
>>> projects. Larger ones may need some build tools...
>>> 2011/10/11 dokondr <dokondr at gmail.com>
>>>> I need to call Stanford NLP Parser from Haskell (unfortunately Haskell
>>>> does not have a similar one):
>>>> What would be the most reliable framework for this?
>>>> Haskell-Cafe mailing list
>>>> Haskell-Cafe at haskell.org
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> JP Moresmau
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe