Hi,
I'm new to android developement. To make it short. Our project needs to be ported for android. It has some java and C code. We run this java as applet using Oracle JRE in linux systems and using firefox browser.
Now it needs to be done on android and browser. Android doesnot support JRE. Hence i downloaded eclipse, ADT plugin. Added my java files, external JRE library and compiled it. Got the apk and classes.dex.
Now my question here is i'm not able to proceed further. How to execute the same as in JRE before. I'm totally confused. Running the apk in emulator/android mobile only runs the activity.java code. Say i'm printing hello world in that(i dont need that but still i have wrote it as my first program).
I dont know how to execute my other java files(which will run as java applet before in linux systems). I'm stuck here since i have not worked on android.
This would be the first step in to my porting.
Also the easy solution would be to run the applet.jar i have directly on android similar to linux jre. Is it possible.?
Any sort of help would be great. Thanks.
when I install apkmanager and run the 'script' its says java not found you will not be able to use apktool ??
My windows is 64 bit plz help anyone ...if you know how to fix it ??
Install java?
Sent from my SK17i using xda premium
You need to add Java to your system path.
Sent from Arkham
I did have the same problem.
Try install the x64 version, works for me
Firstly, make sure that you download the x64 version of java and uninstall all other versions of java. After installing java if it still doesn't work, the you have to set an environment variable in my computer with the name JAVA_HOME and value as the path of your installation location of java.
Hi.
I want to know if it's possible to run compiled Java code (through the CLI) on my Android (4.0, HTC Sensation XE). I'll be writing and compiling the code on my laptop. The cli programs that I want to write are fairly simple (using java base classes, networking), no graphical interfaces or anything that requires elevated privileges.
My phone is not rooted.
There is no JVM on android, so you cannot directly run Java apps compiled for desktop. All android apps are compiled into dalvik bytecode.
knutson said:
There is no JVM on android, so you cannot directly run Java apps compiled for desktop. All android apps are compiled into dalvik bytecode.
Click to expand...
Click to collapse
So can I get the dalvik VM (with the compiler) on windows/linux ?
From wikipedia I've read that there's a tool called dx that can convert .class files to .dex (but not any .class files can be converted).
Mayhem00 said:
So can I get the dalvik VM (with the compiler) on windows/linux ?
From wikipedia I've read that there's a tool called dx that can convert .class files to .dex (but not any .class files can be converted).
Click to expand...
Click to collapse
It is possible to install Android to VirtualBox and use it to run Android apps (much faster than emulator from Android SDK).
knutson said:
It is possible to install Android to VirtualBox and use it to run Android apps (much faster than emulator from Android SDK).
Click to expand...
Click to collapse
But I want to be able to run short Java programs I make on my phone .
Hi all, I want to have JRE installed in my tablet (Archos 101 G9 8GB + MicroSD 32GB Class10) in Android I already know it is completly imposible, but having an other OS is my option, I tryed having Ubuntu in chroot, with ''complete linux installer'' but I didnt used it so much. Then I installed Ubuntu with this post:
http://forum.xda-developers.com/showthread.php?t=1392167
I installed both 0.21 and 1.0 Beta (found in one of the pages, I dont remember what page), but I was having problems with multitouch, and then, I tryed Plasma Active 3, is what I have installed now, I like it because it is 100% compatible, works everything, but, I dont know how mer works, I dont know how to install programs, or if there is JRE for Mer or not, which is what I want.
What do you recomends? come back to Ubuntu and try to solve the multitouch problems? chroot? Plasma Active 3?
Thanks!
85 viewvs and 0 replys, being ''xda'' I expected somthing better.
I did some changes, with Plasma Active I cant install any program, I dont know what commands it uses, but anyway is a linux based OS for mobiles. I did chroot in Android to Ubuntu, and trying to install JRE says that my OS is ARM and dont install it. I supose it will happens in Plasma Active too.
I have one quiestion now, runing Ubuntu natively, I supose I will have the same problem right?
ViSo36 said:
85 viewvs and 0 replys, being ''xda'' I expected somthing better.
I did some changes, with Plasma Active I cant install any program, I dont know what commands it uses, but anyway is a linux based OS for mobiles. I did chroot in Android to Ubuntu, and trying to install JRE says that my OS is ARM and dont install it. I supose it will happens in Plasma Active too.
I have one quiestion now, runing Ubuntu natively, I supose I will have the same problem right?
Click to expand...
Click to collapse
You will probably have it.
Natively or chrooted, you are still on arm. I tried some googling around, and people just told each others to use openjdk to run java.
Can you test it and report back?
apt-get install openjdk-6-jre
Browser plugin is called icedtea-plugin if I remember correctly.
Sent from my GT-I9100 using xda app-developers app
julle131 said:
You will probably have it.
Natively or chrooted, you are still on arm. I tried some googling around, and people just told each others to use openjdk to run java.
Can you test it and report back?
apt-get install openjdk-6-jre
Browser plugin is called icedtea-plugin if I remember correctly.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks for your help.
I tried it, but I installed openjdk-7-jre, and icedtea-7-plugin, because I need the latest version of java, but when I use ''java -version'' it says ''1.6.0_24''.
I have both versions, default one (6) and 7, using ''sudo update-alternatives --config java'' I can select what version I want, but if I select the version 7, It dont work. (says: couldnt open libjava.so)
ViSo36 said:
Thanks for your help.
I tried it, but I installed openjdk-7-jre, and icedtea-7-plugin, because I need the latest version of java, but when I use ''java -version'' it says ''1.6.0_24''.
I have both versions, default one (6) and 7, using ''sudo update-alternatives --config java'' I can select what version I want, but if I select the version 7, It dont work. (says: couldnt open libjava.so)
Click to expand...
Click to collapse
I did not find direct fix, but you might get something out of this bug report:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/850433
Sent from my GT-I9100 using xda app-developers app
Hi,
I'm following this tutorial http://forum.xda-developers.com/showthread.php?t=1863547 in order to be able to compile PA for my Nexus 4.
I get stuck at java 6 installation : as I'm using a Debian (jessie) as my daily OS, and trying to learn java, I already had it with eclipse and the command "java -version" showed me version 1.7 and openjdk 7.
So I anyway tried to purge java, this of course removed eclipse, and the next step in the tutorial explained how to install Oracle JDK. But I wanted to keep using OpenJDK so I just did a basic install of openjdk-6 with aptitude.
At this point "java -version" shows me 1.6, but... Installing Eclipse and its dependencies make java 1.7 and openjdk-7 come back...
There must be an easy way to solve this ?
Thanks!
PS : As you probably understood I'm using debian daily but I'm not yet a linux geek ^^