Author Topic: nJava - Nspire JVM  (Read 17724 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
nJava - Nspire JVM
« on: January 31, 2012, 09:47:51 pm »
Hello.

As you can guess my the title, I am starting a project to port a Java Virtual Machine to the Nspire.

So far I have found an open sourced JMV here

http://jamvm.sourceforge.net/

That I believe can be ported to the Nspire. It is also written almost entirely in C so I think that'll help.

What I want to do is basically be able to take any Java byte code, and be able to run it on the Nspire. (Possible Minecraft, anyone?) :P

However, I don't know where to start with this project. I downloaded the source for the JVM and found the main file, however I do not know what I need to do to port it to the Nspire.

I hope that this can become a community project where anyone can contribute, because if it were only myself, it might never come to fruition, which would be a shame.

So, first question, where do I start? ExtendeD suggested to me earlier to try to compile the project as is using the Ndless SDK to see what dependencies aren't supported, although I don't know what I should make for a makefile to do that.

Thanks!
« Last Edit: January 31, 2012, 09:48:47 pm by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: nJava - Nspire JVM
« Reply #1 on: January 31, 2012, 09:49:42 pm »
That might be pretty awesome. Good luck on the project! :D
« Last Edit: January 31, 2012, 09:50:26 pm by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline hellninjas

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 625
  • Rating: +17/-0
    • View Profile
Re: nJava - Nspire JVM
« Reply #2 on: January 31, 2012, 09:50:50 pm »
:O This makes me want to leanr Java!!! DO NOW !! lol
Now if only this could be done with C++ D:

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: nJava - Nspire JVM
« Reply #3 on: January 31, 2012, 10:18:30 pm »
i might be interested. also did you try what extended suggested, thats how i would do it, get one bug out at a time
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: nJava - Nspire JVM
« Reply #4 on: January 31, 2012, 10:23:48 pm »
i might be interested. also did you try what extended suggested, thats how i would do it, get one bug out at a time

Well, I'm trying to figure out how to try what Extended suggested. I don't exactly know what I need to do with make, includes, etc.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: nJava - Nspire JVM
« Reply #5 on: January 31, 2012, 10:26:11 pm »
how many includes and files are there??
im sick so i have plenty of time on my hands...
i think i will be home tomorrow too
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: nJava - Nspire JVM
« Reply #6 on: January 31, 2012, 10:30:49 pm »
A ton. I count at least 47 files. D:

I have some time on my hands. Mainly on the Weekends though.


Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: nJava - Nspire JVM
« Reply #7 on: January 31, 2012, 10:36:57 pm »
i got it unzipped and everything, and there are alot... i'll take a better look at it in the morning
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: nJava - Nspire JVM
« Reply #8 on: January 31, 2012, 10:46:17 pm »
Yeah, once this gets started I'll start a sourceforge project for it, or perhaps a DropBox Shared Folder.

Something for multiple people to collaborate on the project.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: nJava - Nspire JVM
« Reply #9 on: January 31, 2012, 10:52:13 pm »
See, now is the part where I wish I didn't stop learning Java
You just lost the game.



Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: nJava - Nspire JVM
« Reply #10 on: February 01, 2012, 01:24:44 am »
You won't see minecraft. It uses a few native code libs which will be worse to port than the whole JVM, like LWJGL.

Not to say you shouldn't do it! There's plenty of stuff (games) that run with pure java libs.
« Last Edit: February 01, 2012, 01:25:10 am by willrandship »

Offline Reo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 64
  • Rating: +15/-0
    • View Profile
Re: nJava - Nspire JVM
« Reply #11 on: February 01, 2012, 01:36:21 am »
Is there any way that we would be able to use the Jazelle instruction set that the Nspire's ARM processor apparently supports?

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: nJava - Nspire JVM
« Reply #12 on: February 01, 2012, 02:06:20 am »
First of all: such projects are interesting because they can indeed help filling in the blanks of the Ndless infrastructure, and therefore help other projects, which is a good reason to pursue them - not to mention that they can be a good learning experience :)

But if the port of JamVM and its dependencies (GNU Classpath...) is completed, people should not set their hopes too high about its speed, for the practical purposes of, say, running Java games on the Nspire. Not to say that it shouldn't be done, but here are several facts:
* JamVM's performance is better than that of a number of other JVMs, but it's not the most optimized JVM for ARM platforms. The one in OpenJDK / IcedTea (well, Sun/Oracle's code) is, but chances are that it's harder to compile than JamVM is, and it definitely has a much larger fooprint;
* GNU Classpath (which is what released versions of JamVM use) is missing lots of classes and methods, and it's unmaintained; OpenJDK's class library is not necessarily very easy to compile either, and it has a larger footprint than GNU Classpath has, because it's more complete.

I'm speaking out of my recent professional experience with Java (precisely JamVM, GNU Classpath, OpenJDK) and native code on recent ARM platforms, and I don't mean to bash Java ;)
The platforms I've used / I'm using have superscalar Cortex-A8/A9 processors (i.e. more advanced than the ARM9 in Nspires), clocked at much higher frequencies (4x-8x), and they have much more RAM (512 MB or 1 GB), than Nspires... and yet, on such platforms, CPU-intensive native code is more or less an order of magnitude slower than on modern x86_64 cores. What performance can interpreted languages achieve on platforms which are nearly an order of magnitude less powerful than those ? Yeah, probably not much better than TI's proprietary, non-standard Lua, or a third-party port of LuaJIT ;)


Reo: well, open source software is unlikely to use Jazelle, read more thoroughly the page you've pointed ;)


Again, there are plenty of valid reasons for working on such a project, some of them are mentioned in the first paragraph. But speed for practical matters is unlikely to be one of them.
« Last Edit: February 01, 2012, 02:21:27 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: nJava - Nspire JVM
« Reply #13 on: February 01, 2012, 02:17:47 am »
Maybe you should take a look at Java ME (phoneME). Its specifically made for (simple) mobile phones, so I assume it will have a lighter footprint.
There are a ton of games that work on it, and its open source :)

Offline Reo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 64
  • Rating: +15/-0
    • View Profile
Re: nJava - Nspire JVM
« Reply #14 on: February 01, 2012, 02:19:03 am »
Reo: well, open source software is unlikely to use Jazelle, read more thoroughly the page you've pointed ;)
Obviously a non-ARM specific virtual machine wouldn't use Jazelle, we'd have to find a way to implement it ourselves.
« Last Edit: February 01, 2012, 02:19:10 am by Reo »