Possibly Close To Solving Java on Windows RT? - Microsoft Surface

Alright I've searched for a while to find a way to get my Surface 2 to run .java files as I have Notepad++ on here. I've seen that there is a Java version for ARM architecture but it's for the Raspberry Pi.
What I've done so far, and I'm hoping that someone else will be able to take it further as it will be a very valuable tool, is;
-Download the Java file 'Linux ARM 32 Hard Float ABI' from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-Extracted the .tar.gz file using 7Zip, then extracted the .tar file the same way.
-Moved the jdk folder into C:\Program Files\Java (where it would go if being installed on a normal Windows computer)
-I then used an elevated Command Prompt to open Environment Variables and added JAVA_HOME to the system variables with the value 'C:\Program Files\Java\jdk1.8.0_73'. I also edited the Path variable to include 'C:\Program Files\Java\jdk1.8.0_73\bin'
Now as far as I know surely that's half the job done? But if I try and do anything in cmd that starts with 'java' it says it's not recognised.
Have I done the Paths wrong? Another thing I noticed is that on a Windows 10 PC there are also Java files in 'C:\ProgramData\Oracle\Java\javapath' but this is the only difference between Java on my laptop and Surface.
The problem is these files are compiled for x86 or x64 architectures and won't do anything on my Surface.
Considering the files in ProgramData are now the only Java differences between my laptop and my surface and I've been told it's possible to install Java without using the installer and just copying files across a system, would it be possible for anyone to find a way to have those files on an ARM system or a way to run it without those?
Bear in mind this is the first time I've properly tried to do anything like this so if it's a bad idea please let me know nicely lol. I just haven't seen anyone go down this route, maybe there's a reason but it intrigued me so I thought I'd ask.
Thank you

You can't run Linux binaries on Windows. So downloading the Linux version of JAVA will not work.
EDIT: It's an interesting concept. It should be theoretically possible to compile OpenJDK to work on RT.

abtekk said:
You can't run Linux binaries on Windows. So downloading the Linux version of JAVA will not work.
EDIT: It's an interesting concept. It should be theoretically possible to compile OpenJDK to work on RT.
Click to expand...
Click to collapse
Oh I see, yeah I wasn't sure how far it could go but I thought I'd put it out there. I have absolutely no idea how to go about compiling that so I'm hoping someone sees this and does everyone a favour as this would be an extremely useful tool to have!

Related

General Linux question

OK so I am running Ubuntu 9.04. I have a couple of java files that I would like to be able to run from terminal from anywhere in the system. Is this possible? Basically I don't want to have to move my target file to the folder that contains the .jar file every time I run it. Does that make sense?
Any help would be appreciated. I have been pretty much reliant on Linux for the past 3 months but I haven't figured this one out yet and it is kinda bugging me.
http://www.google.com/search?source...nG=Google-søgning&meta=lr=&aq=0&oq=linux+path
adding their dir to the path could fix that if I understand you correctly

[Help!] Compiling an Android APK on Windows using Eclipse

I recently worked on a theme for some home alternative apps but when I tried to compile it in Eclipse, things seemed to be missing (for example Keytool and Jarsigner) which are not in my SDK directory anywhere.
I was able to get the theme to work by using the APK from someone else's, replacing the images with mine and signing using the Autosign tool downloaded from XDA but I was unable to change the name of the app in the Manifest.
So my question is, is there a way to compile in Windows at all? Reading the guide on the developers.android page didn't answer anything for me.
Also, would there be anyone willing to walk me through that? If not, just knowing if its possible is enough for me.
Windows 7 64-bit
im on windows 7 64 and I can compile my apps without any problem. right click on the folder of your app -> android tools -> export as signed / unsigned (which ever you prefer)
The "keytool" and "jarsigner" programs are in the JDK, which you'll need to get from Oracle (formerly known as Sun). Set the JAVA_HOME environment variable to the JDK directory; in my case, C:\Program Files\Java\jdk1.6.0_18, and add the JDK's bin path--in my case, C:\Program Files\Java\jdk1.6.0_18\bin--to your PATH environment variable. You may need to logoff/logon or reboot for everything to settle out. If you get the latest JDK, the paths should end in _20 instead of _18.
jarsigner is not needed in eclipse as eclipse will sign and zipalign the apk for you.
File | Export
Choose Android | Export Android Application
Create a new keystore via the tool and it will automatically sign and zipalign creating a nice new apk for you

[Q] Need help with PATH variable in ADB!

So, like a noob, when I was adding to the path variable while setting up ADB on my laptop I managed to completely overwrite the PATH with the addition. Yeah yeah, I know dumb mistake. I just did a copy and paste so there were no typo's. Lesson learned: type it out and double check it for now on. I attribute it to being up too late and inhaling too many Monster's.
Can anybody help me with the whole path? Or at least what the format of it should be so I can cobble it together based on where everything is on my laptop.
Some background: I am setting up my Nook Color to run Honeycomb off the SD card and was in the process of trying to get the google apps onto it. I have a 64-bit version of Windows 7. Everything is in the root folder (C:\) and the drivers are already in there.
All you're entering in there is the path to the sdk phone-tools folder. That's it. So figure out the path something like: c:\sdk\phone-tools then name it adb. I assume this is what you're trying to do?
Here is the path variable from my 32bit Windows 7
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
Hopefully this will at least get you started if it isn't the same on the 64bit.
Just as a note, I warned someone else that the instructions for adding the ADB path were incorrect, that the ADB path needs to be appended to the end of the existing path, not overwrite it.
Thanks. I'll try this.
If anyone else has any input, it would be greatly appreciated.
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\adb\android-sdk-windows\platform-tools
Mine looks the same as above poster on my 64bit laptop.

[Q] Any way to compile java programs in android ?

Is there a way to compile .java file to .class file and execute it
I wanted to compile c/c++/java programs, not for my phone but in my phone...
I searched but did not find an easy way for it.
At last I found out a real easy way to compile c/c++ by using adosbox for android.
I copied the turbo c 'tc' folder from my pc to my sdcard and used adosbox like command promt to go to 'bin' folder in tc and start tc.exe...
Then I could easily write and compile programs just like i did on the pc
But still no luck for java programs...
I copied the reqired java folder and then used adosbox to run the command "javac file.java" but it said "This Program Cannot Be Run in DOS Mode"
So if there is any other way to compile java programs in my phone
please help
Thanx in advance
Try looking at Eclipse, although Eclipse is a large desktop IDE, it includes its own Java compiler written in Java (in the part called "JDT core"), and if (as I hope) that Java compiler is not copyrighted by Sun/Oracle, you (or someone else already maybe) may be able to compile that part of Eclipse into a "native" Dalvik/Android App.
Googling the issue, I see that others have been asking for an Android port of Eclipse too, so maybe there will be some momentum going for this soon.

How to decompile library (.so) android on windows

how to decompile file *.so (library) android on windows? what tool can I used? any ideas??
saigetshu said:
how to decompile file *.so (library) android on windows? what tool can I used? any ideas??
Click to expand...
Click to collapse
Decompiling a library is not easy even on Linux! This is not something you will learn overnight. It takes years to master this.
For starters, forget about cross-decompiling. Install Linux, even a virtual machine will be better than nothing.
A .so is a compiled library. Usually generated from C or C++ source code but these days it may have been generated directly from Go source, D or some other minor language.
Then, Google "linux decompiler" and try it. But you will need to learn quite a bit of C, C++, Assembler and Linux API. Also, use readelf to find out the dependencies (DT_NEEDED ELF header).
You probably want to read Ulrich Drepper's paper on Linux shared objects and the ELF specification.
pgquiles said:
Decompiling a library is not easy even on Linux! This is not something you will learn overnight. It takes years to master this.
For starters, forget about cross-decompiling. Install Linux, even a virtual machine will be better than nothing.
A .so is a compiled library. Usually generated from C or C++ source code but these days it may have been generated directly from Go source, D or some other minor language.
Then, Google "linux decompiler" and try it. But you will need to learn quite a bit of C, C++, Assembler and Linux API. Also, use readelf to find out the dependencies (DT_NEEDED ELF header).
You probably want to read Ulrich Drepper's paper on Linux shared objects and the ELF specification.
Click to expand...
Click to collapse
thanks for advice, it's possible to convert architecture library? example from architecture arm v7a to x86.
saigetshu said:
thanks for advice, it's possible to convert architecture library? example from architecture arm v7a to x86.
Click to expand...
Click to collapse
It's not impossible but it's very complex. It's not a path you want to pursue unless you are in the business of providing a solution to run ARM code on x86.
Use qemu or a vendor-provided ARM virtualization/emulation solution (e. g. WindRiver Simics) if you want to debug ARM code on x86. Or just start gdb server on the ARM device and remotely debug, here you have a nice guide that will get you started:
https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver
thats really helping me, thanks again for your advice

Categories

Resources