Questions tagged [java]

Java is a general-purpose programming language. Use this tag only for topic/technology that is related to the Android environment. DO NOT USE THIS TAG FOR APP DEVELOPMENT ISSUE BECAUSE IT IS OFF-TOPIC.

Developers can use the Java programming language to write Android apps. It's possible to use other languages too, but since all of the standard GUI components are written in Java, that's the most popular. 'Java' can also refer to the Java Virtual Machine (JVM), which is the foundation for running apps that were written in Java (or some other languages). Android has a special kind of JVM named . In general, each app is isolated in its own copy of Dalvik for .

Although programming questions are off-topic for this site, power users and those curious about how Android works sometimes have questions that relate specifically to the language or the JVM.

54 questions
65
votes
1 answer

Does the Log4j vulnerability affect Android users?

The new vulnerability CVE-2021-44228 (also known as Log4Shell) is wreaking havoc, but very little of the discussion is voiced about the average android user. Is the average Android OS user at risk? I heard that Java's JNDI is not implemented in…
mistes
  • 759
  • 1
  • 5
  • 3
20
votes
5 answers

Are there any Android browsers that support loading a Java Applet in-browser?

We have a client who are switching away from Windows Mobile (and IE Mobile) to Android based devices. We have some specific software that we deploy to their WM workforce by an ActiveX applet that loads in IE Mobile, but obviously Android will have…
Farseeker
13
votes
4 answers

Can you run 'normal' Java programs on Android?

I know some 'normal' Java (computer Java), and I want to run such a program on my Android device. Is this possible? If yes, how?
scheurneus
  • 239
  • 1
  • 2
  • 3
9
votes
4 answers

Is it possible to run Minecraft on an Android?

I was thinking in using some tools to convert the JAR into an APK. But will my Nexus One have enough memory? And what about the controls?
Jader Dias
  • 1,464
  • 5
  • 17
  • 25
9
votes
5 answers

How can I install .jar files on my Android?

I downloaded some 3D games, unzipped them, and got .jar files. How can I use these in Android? I have a Galaxy S running 2.1.
Jeevan Bhatt
  • 954
  • 5
  • 11
  • 22
5
votes
2 answers

J2ME emulator that works for ICS?

Is there any J2ME emulator like JBed for ICS? I've found a ton of tutorials like this but as far as I know, all of them are exclusively for Gingerbread and below. P.S. I already tried J2ME Runner but whenever I submit my JAR and JAD files for…
Propeller
  • 2,466
  • 18
  • 49
  • 66
5
votes
1 answer

Do calls to Java native interface in android apps run within Dalvik VM?

I read that apps sometimes access the native libraries for optimization purposes via the Java native interface. As far as I understand, JNI just provides java wrappers around c/c++ libraries/binaries which are written closer to hardware hence…
5
votes
2 answers

How is the Android System running Java jars?

There is a large amount of Java jars in /system/framework, for example, am.jar. I understand that Android uses Java in a very confusing way (at least for me). I do not completely understand the way that dalvik works. Basically, I do not understand…
Tyler Richardson
  • 189
  • 1
  • 11
4
votes
2 answers

Compiling and running java applications from android terminal?

I recently got a bluetooth keyboard for my Motorola Xoom tablet, and upon realizing that BusyBox comes with vi for text editing I started wondering about writing and executing code on android. I tried running $ javac in Terminal Emulator but to no…
John Dorian
  • 161
  • 1
  • 1
  • 4
4
votes
1 answer

Error: java.lang.IllegalStateException: java.util.concurrent.TimeoutException: Thread Binder_C gave up waiting for partitionMixed after 180000ms

After entering the final command to make a mixed-format SD card in How can I move apps to SD on non-adopted Marshmallow storage?: $ adb shell sm partition disk:179,64 mixed 25 I meet this error: Error: java.lang.IllegalStateException:…
Ooker
  • 526
  • 10
  • 31
3
votes
1 answer

Can Java be exploited through Android app ads?

It turns out that Java has a security flaw that is currently being exploited to put malware on people's computers. Is there any risk that advertisements in Android apps will have embedded, malicious Java code in them? If so, how can I make sure to…
Kevin
  • 222
  • 1
  • 3
  • 15
3
votes
0 answers

Intercept system commands from app

I'm on Android 7.1.2 (Nougat). I have an app that I am trying to pull the exact command /parameters that it is sending to one of my /system/bin apps. It is not in logcat and I haven't been able to find it with strace either. What I'm looking to do…
Corey F
  • 31
  • 3
3
votes
1 answer

How to find HTTP requests in apk source code

I've extracted an apk(react native) with dex2jar and jar to java through jd-qui and also with apktool, and I can view the source code but there is no clue where are the HTTP requests in the source code. When I intercept the apk traffic I can see all…
Luor Themes
  • 31
  • 1
  • 2
3
votes
1 answer

Is there a way to call/invoke a (private) Java function in an app?

Is there some tool that can be used in ADB shell or something similar (without root possibly) that can invoke a function in the app, while it is running?
3
votes
1 answer

How determine if Java object is null or not in Tasker?

I want a Tasker task that reads SMS from a particular person and extracts some information out of the latest message. For example, I get a lot of messages from my bank due to the transactions I make. At the touch of a task, I want to know my latest…
deostroll
  • 187
  • 1
  • 13
1
2 3 4