Questions tagged [jvm-languages]

Languages that compile their source code to the byte code of the java virtual machine are commonly called JVM languages. A common feature of those languages is that the Java APIs can be used more or less seamlessly.

The following list could be completed over time.

Important JVM languages:

  1. Java (object oriented)
  2. Scala (object oriented/functional)
  3. Clojure (Lisp-y)
  4. Groovy (OO scripting)

Implementations of popular languages for the JVM:

  1. Python
  2. Ruby

Recent/upcoming languages:

  1. Kotlin (object oriented, ...)
  2. Ceylon (object oriented, ...)
  3. Frege (pure functional, like Haskell 2010)
150 questions
2
votes
1 answer

Calling Clojure classes in Scala code

I have a simple clojure code with project.clj having : :uberjar-name "piezojob.jar" :aot :all :main piezo-jobs.core :dependencies [[org.clojure/clojure "1.8.0"] [clojurewerkz/quartzite "2.0.0"]] My core.clj is : (ns…
Ashish Negi
  • 5,193
  • 8
  • 51
  • 95
2
votes
1 answer

Kotlin: Compiler doesn't infer generic type for some operators

Why can't Kotlin's compiler infer the generic type with some operator calls? For example: class Example { operator inline fun unaryMinus(): T { ... } } Using it in a main method... fun main(args: Array)…
Jire
  • 9,680
  • 14
  • 52
  • 87
2
votes
2 answers

Comparison of XML parsing APIs on the Java SE platform

I am currently developing an RSS feed reader, and I am wondering which XML parsing API would be the best fit for that. (Please note that I am not looking for a Feed parser library - it is merely the starting point for that research about XML APIs)…
Jean Hominal
  • 16,518
  • 5
  • 56
  • 90
2
votes
1 answer

What is a good use case to implement for learning Functional Programming?

I am a Java programmer looking to learn Functional Programming. My aim is to implement a simple use case (say a simple text-based game like tic-tac-toe) in various Functional Programming languages (i.e. Clojure, Scala) in order to learn the ins and…
Mark
  • 455
  • 1
  • 5
  • 11
2
votes
3 answers

Something to allow "Writing flex without ActionScript", or "Java to AVM2 compiler", or "Write Flex using Java" exists?

There are many dynamic languages that target Sun's JVM (Groovy, Scala, Jython, Jruby etc) and I was sure there are many that target Adobe's AVM as well. But I was surprised to find only Haxe do something similiar. related question on this site I…
Eran Medan
  • 44,555
  • 61
  • 184
  • 276
2
votes
3 answers

Packages in JVM languages

In Java, classes are placed in a package with a declaration like package com.acme.foo and by putting your source files in a subdirectory like com/acme/foo. I'm working on a JVM language intended to be more don't repeat yourself in style than Java,…
rwallace
  • 31,405
  • 40
  • 123
  • 242
2
votes
3 answers

How to add new JVM languages e.g. Scala, Clojure, Fantom, Groovy to Eclipse IDE?

What's a prefereed way to download Scala , via scala-lang.org, can it be added directly by the Eclipse IDE or how to add Scala to Eclipse IDE? Is there a convention on how to add a JVM language? Update I could add Clojure and Scala from…
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
2
votes
1 answer

Alternatives to BDB JE embedded database

I was using BDB JE since times it was developed by SleepyCat, than it was acquired by Oracle and the licensing policy is not clear now. So what are the alternatives to such key-value database with custom serializers of key and value objects ability…
jdevelop
  • 12,176
  • 10
  • 56
  • 112
2
votes
4 answers

Why adding a new method to the Java interface breaks the clients that depend on old version?

In Java when you add a new method to an interface, you break all your clients. When you have an abstract class, you can add a new method and provide a default implementation in it. All the clients will continue to work. I wonder why the interface is…
aviad
  • 8,229
  • 9
  • 50
  • 98
2
votes
4 answers

Scripting-language for JVM with fast initialization

I have a simple java application that gets jmx connection url, object name and attribute name as inputs and outputs attribute value. This application runs hundreds of times every minute and has strict running time limitations. Recently many corner…
Blin
  • 698
  • 9
  • 18
1
vote
1 answer

How I Can Find The Possible Combinations That Form The Given Input

I have a list like this, say for example the list name is output which has: [[[o, g], [g, o]], [[o, g, o, d]], [[o, d]], [[t, s, n, e, e, e, n, c, s]], [[t, s, n, e, e]], [[e, n, c, s]]] And I have a input like this, say input is:…
Ant's
  • 13,545
  • 27
  • 98
  • 148
1
vote
1 answer

How to import a Jython file into Groovy?

I want to use some Jython code as a Groovy closure so I believe I need to import the Jython file into the Groovy script and pass it into Groovy's MethodClosure() function to generate the closure. For example, I put this into a Groovy file: import…
espeed
  • 4,754
  • 2
  • 39
  • 51
1
vote
1 answer

How does Groovy handle closure scope and recursion?

I have a recursive Python function that builds a tree, and I'm trying to translate it into Groovy. Here's the Python version... def get_tree(vertices): results = [] if type(vertices) != list: vertices = [vertices] for vertex in…
espeed
  • 4,754
  • 2
  • 39
  • 51
1
vote
3 answers

A Script Engine that Interprets Java

I remember running into an open source project that built a Java scripting engine that interprets Java (no, not Rhino, that's for JavaScript, it runs Java). If you have come across that project, please share Link(s). (Of course doing a Google…
vladimir.vivien
  • 512
  • 1
  • 6
  • 8
1
vote
2 answers

Compilation of Groovy Code in Grails application

When I build a war file for my Grails application via grails war it still contains some groovy files. After the war-filed is deployed on an application server, when and how are this files compiled to java bytecode?
sofarsogood
  • 291
  • 2
  • 13