Java (jre) on Surface RT

Search This thread

binnym

Member
Feb 8, 2011
41
1
So I have a question?

Is there a way to enable java on the surface rt.
Because for my remote access to work I need JRE.


Thanks
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
There's two ways I could see this happening.

The simplest would be for somebody to take the Java source code, build it for Windows but target ARM, then sign it and tell people to go through the hoops needed to run third-party desktop-mode apps on RT. This would probably actually be pretty easy, if Java has a target for "use ARM instructions" in its JIT. If not, it would have to interpret the bytecode, which is very slow (although usable).

The second way is for the JRE to be built as a Metro-style app. It would probably have to hook a bunch of native APIs that aren't allowed in Store apps, so it would remain as homebrew, but it could be packaged as an APPX and would be easy enough to install. It would be both more difficult to port and possibly more of a hassle to use, though. With care and luck, it might even be possible to get it submitted to the Store, though, which (combined with setting it up as a file handler for .JAR) would make it widely usable. I doubt MS would approve it, though.
 
There's two ways I could see this happening.

The simplest would be for somebody to take the Java source code, build it for Windows but target ARM, then sign it and tell people to go through the hoops needed to run third-party desktop-mode apps on RT. This would probably actually be pretty easy, if Java has a target for "use ARM instructions" in its JIT. If not, it would have to interpret the bytecode, which is very slow (although usable).

The second way is for the JRE to be built as a Metro-style app. It would probably have to hook a bunch of native APIs that aren't allowed in Store apps, so it would remain as homebrew, but it could be packaged as an APPX and would be easy enough to install. It would be both more difficult to port and possibly more of a hassle to use, though. With care and luck, it might even be possible to get it submitted to the Store, though, which (combined with setting it up as a file handler for .JAR) would make it widely usable. I doubt MS would approve it, though.

I guess that the source isent available. And the open source version for Linux would be quite hard to port right?
 

SixSixSevenSeven

Senior Member
Dec 26, 2012
1,617
318
I guess that the source isent available. And the open source version for Linux would be quite hard to port right?

Actually, it is available.

---------- Post added at 10:42 AM ---------- Previous post was at 10:38 AM ----------

There's two ways I could see this happening.

The simplest would be for somebody to take the Java source code, build it for Windows but target ARM, then sign it and tell people to go through the hoops needed to run third-party desktop-mode apps on RT. This would probably actually be pretty easy, if Java has a target for "use ARM instructions" in its JIT. If not, it would have to interpret the bytecode, which is very slow (although usable).

The second way is for the JRE to be built as a Metro-style app. It would probably have to hook a bunch of native APIs that aren't allowed in Store apps, so it would remain as homebrew, but it could be packaged as an APPX and would be easy enough to install. It would be both more difficult to port and possibly more of a hassle to use, though. With care and luck, it might even be possible to get it submitted to the Store, though, which (combined with setting it up as a file handler for .JAR) would make it widely usable. I doubt MS would approve it, though.

Oracle do now offer ARMv6 hard float (which is then compatible with ARMv7) as a JIT option, it is standard software in raspbian on the raspberry pi as of a few weeks ago, in fact that is why they added that support. Now if only regular ARMv7 code worked on RT instead of THUMB_2. Don't know if java will actually build under visual studio either, funnily enough googling for any combination of "compile" "java" and "visual studio" gets you results for compiling java source code to the JRE under visual studio rather than compiling the JRE itself :p

---------- Post added at 10:45 AM ---------- Previous post was at 10:42 AM ----------

So I have a question?

Is there a way to enable java on the surface rt.
Because for my remote access to work I need JRE.


Thanks

You would need a jailbroken RT, that isn't hard (look in windows RT development and hacking, pinned thread right up top).
Then you would need the JRE which doesn't exist.
Its slow and incompatible with a fair amount of software but if you get as far as jailbreaking your RT you could *try* IKVM, its a java virtual machine running ontop of .NET and does work on RT. It can't be used as a browser plugin though so your remote access would need to be a standalone .jar rather than a web applet.
 
  • Like
Reactions: filfat

Techrocket9

Senior Member
Jun 30, 2010
444
17
I wonder if IKVM would be fast enough to run Minecraft on the SRT or S2...

It would be ironic if the only major tablet platform that Mojang refuses to support ended up being the only platform with the complete game.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
I wonder if people will *ever* learn to do even a cursory search before posting? People have been talking about that literally since the first release of the jailbreak. The forums are littered with it.

Speed is the least of many problems (although I suppose the OpenGL issue has sort-of been resolved, albeit with yet another hit to performance).
 

SixSixSevenSeven

Senior Member
Dec 26, 2012
1,617
318
I wonder if people will *ever* learn to do even a cursory search before posting? People have been talking about that literally since the first release of the jailbreak. The forums are littered with it.

Speed is the least of many problems (although I suppose the OpenGL issue has sort-of been resolved, albeit with yet another hit to performance).

LWJGL doesnt load in IKVM on x86 though.
 

TheRinseM

Senior Member
Jan 31, 2013
899
1,349
Hey everyone,

There is already a version of Java for ARM-based architectures. I don't know if it will run with Windows, but
as soon as i'm gonna get the RT, i'm gonna try it :)
 

SixSixSevenSeven

Senior Member
Dec 26, 2012
1,617
318
Hey everyone,

There is already a version of Java for ARM-based architectures. I don't know if it will run with Windows, but
as soon as i'm gonna get the RT, i'm gonna try it :)

Just because there is java for ARM based architectures doesnt mean its for windows, it specifically has to be for windows actually (which it isn't).
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Not to mention it's compiled for the ARM instruction set, rather than the THUMB2 instruction set that RT actually uses. The CPU can run both, but RT will make non-THUMB code crash.
 
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Huh. That's still a bit promising. We would still need to recompile it for Win32/NT, but at least we wouldn't have to re-write the whole JIT.

Major project anyhow. Even if somebody with the requisite knowledge stepped up to start this right now, it would be a while before it bore fruit. Doesn't mean it shouldn't be attempted, but don't hold your breath. In fact, don't expect anything at all, unless somebody says they're able to take this on.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    There's two ways I could see this happening.

    The simplest would be for somebody to take the Java source code, build it for Windows but target ARM, then sign it and tell people to go through the hoops needed to run third-party desktop-mode apps on RT. This would probably actually be pretty easy, if Java has a target for "use ARM instructions" in its JIT. If not, it would have to interpret the bytecode, which is very slow (although usable).

    The second way is for the JRE to be built as a Metro-style app. It would probably have to hook a bunch of native APIs that aren't allowed in Store apps, so it would remain as homebrew, but it could be packaged as an APPX and would be easy enough to install. It would be both more difficult to port and possibly more of a hassle to use, though. With care and luck, it might even be possible to get it submitted to the Store, though, which (combined with setting it up as a file handler for .JAR) would make it widely usable. I doubt MS would approve it, though.
    2
    Why yes, I have a link:
    http://letmebingthatforyou.com/search?q=get+jre+source+code

    Rule number one of the forum, please follow it!
    1
    I guess that the source isent available. And the open source version for Linux would be quite hard to port right?

    Actually, it is available.

    ---------- Post added at 10:42 AM ---------- Previous post was at 10:38 AM ----------

    There's two ways I could see this happening.

    The simplest would be for somebody to take the Java source code, build it for Windows but target ARM, then sign it and tell people to go through the hoops needed to run third-party desktop-mode apps on RT. This would probably actually be pretty easy, if Java has a target for "use ARM instructions" in its JIT. If not, it would have to interpret the bytecode, which is very slow (although usable).

    The second way is for the JRE to be built as a Metro-style app. It would probably have to hook a bunch of native APIs that aren't allowed in Store apps, so it would remain as homebrew, but it could be packaged as an APPX and would be easy enough to install. It would be both more difficult to port and possibly more of a hassle to use, though. With care and luck, it might even be possible to get it submitted to the Store, though, which (combined with setting it up as a file handler for .JAR) would make it widely usable. I doubt MS would approve it, though.

    Oracle do now offer ARMv6 hard float (which is then compatible with ARMv7) as a JIT option, it is standard software in raspbian on the raspberry pi as of a few weeks ago, in fact that is why they added that support. Now if only regular ARMv7 code worked on RT instead of THUMB_2. Don't know if java will actually build under visual studio either, funnily enough googling for any combination of "compile" "java" and "visual studio" gets you results for compiling java source code to the JRE under visual studio rather than compiling the JRE itself :p

    ---------- Post added at 10:45 AM ---------- Previous post was at 10:42 AM ----------

    So I have a question?

    Is there a way to enable java on the surface rt.
    Because for my remote access to work I need JRE.


    Thanks

    You would need a jailbroken RT, that isn't hard (look in windows RT development and hacking, pinned thread right up top).
    Then you would need the JRE which doesn't exist.
    Its slow and incompatible with a fair amount of software but if you get as far as jailbreaking your RT you could *try* IKVM, its a java virtual machine running ontop of .NET and does work on RT. It can't be used as a browser plugin though so your remote access would need to be a standalone .jar rather than a web applet.