Bluetooth DUN || Other JVM languages

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Bluetooth DUN || Other JVM languages

Postby pepijndevos » Fri May 14, 2010 9:13 am

Hi,

I was wondering if it is possible for a LeJOS controlled NXT brick to act as a DUN server/client. Either to fetch data from the web or to run a web interface.

My mac has the option to use a DUN network, and since DUN runs on top of SPP which is used with the NXT, I thought it would be possible to do this.

I'd also like to know if it is possible to run something like Scala, Jython or Clojure on the NXT with LeJOS.
pepijndevos
New User
 
Posts: 24
Joined: Fri May 14, 2010 8:56 am

Postby gloomyandy » Fri May 14, 2010 6:11 pm

Hi,
DUN is not directly supported, however there are a couple of samples that show how a PC can be used to proxy some network/web requests.

I'm pretty sure that other languages can not be supported directly. leJOS uses a pre-linked varient of the standard Java byte code (to reduce memory usage), I'm pretty sure that the languages that you mention generate byte code on the fly and/or require dynamic class loading (which is not really possible with leJOS)...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4114
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Bluetooth DUN || Other JVM languages

Postby pepijndevos » Thu Mar 22, 2012 5:21 pm

Some years after my original post, I tried to register on this forum, because I basically wondered the same thing again, and found that I had already registered and asked what I wanted to ask.

I'm not sure if I completely get your point about pre-linking, but I understand that any runtime loading and generating is not possible.

There are several languages, like Mirah, which do not do any fancy stuff, except for adding a nice syntax and type inference. Could that work?

I wonder if Lejos really runs JVM bytecode?
pepijndevos
New User
 
Posts: 24
Joined: Fri May 14, 2010 8:56 am

Re:

Postby mikebridge » Sat Apr 07, 2012 5:01 am

I attempted to cross-compile a clojure file into a nxt java class, but I received this error:

Code: Select all
$ java -Xbootclasspath:$NXJ_HOME/lib/nxt/classes.jar  -cp ./classes:lib/clojure-1.3.0.jar -Dclojure.compile.path=./classes clojure.lang.Compile cljbot.helloworld
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/ClassLoader


I assume the pre-linking step you mention here is why I'm getting this error---and it means this is probably not going to work?

-Mike


gloomyandy wrote:Hi,
DUN is not directly supported, however there are a couple of samples that show how a PC can be used to proxy some network/web requests.

I'm pretty sure that other languages can not be supported directly. leJOS uses a pre-linked varient of the standard Java byte code (to reduce memory usage), I'm pretty sure that the languages that you mention generate byte code on the fly and/or require dynamic class loading (which is not really possible with leJOS)...

Andy
mikebridge
New User
 
Posts: 2
Joined: Sat Apr 07, 2012 12:59 am


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

more stuff