I am a begginer in android and I want to develop an application which show a list of jar files to user and user can choose one of them and run it. Is it possible to run a jar file in an android application? (not as a library)
Nope we cannot run a jar file on android devices, You see we have .apk to install it on our android device. But not .jar, Also Android uses the Dalvik VM, where as you need the Java VM to run a jar-file. So you can run jar on android.
Related
I've built a simple java console app that prints "Hello World", and I'm trying to make it's .class/.jar bytecode run in an Android emulator (Nox). For that, I've transfered the .jar and .class files from the app to the emulator via Google Drive, and tried to use two java emulating Android apps so far: Java Manager and J2ME Loader.
In Java Manager, I got the following error while trying to run the .class file:
Failed to dexing Class
And in J2ME I got the following error while tring to run the .jar file:
Broken manifest
Does anyone has any idea of how to fix those errors in any of those two java emulators for Android? I'm not finding another app in Play Store.
Android can neither execute Java (J2SE class files) nor J2ME code. It has it's own format which bases on Java, however the compiler infrastructure is different from J2SE. There may be emulators allowing to execute J2SE or J2ME code, however I would not rely on such products as the support is usually incomplete.
Therefore you need the Android SDK (and/or the development IDE "Android Studio") for creating Android Apps.
When you have created an Android App (apk file) you can deploy and run it an and Android device or the emulator you have mentioned.
I installed VS2015 with Android support on Windows 10. If I run "C:\Program Files (x86)\Android\android-sdk\SDK Manager.exe", it shows that Google Play services samples are in "C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\" , but I cannot figure out where Google Play services themself are and what is the path to their jar files? (if they have jar files).
I am getting "package com.google.android.gms.ads does not exist" Java compiler error while compiling some QT project containing some Java code and trying figure out either the package does not exist on my machine at all or QT Creator is not configured properly.
It located at extras/google/m2repository/com/google/android/gms
You can extract .aar to see .jar file
I can't find a way to create an Android Studio jar file for Desktop. I am using Android Studio 1.3.2 and LibGDX library. I created a video game and I want to share it with other PC's without having to install Android Studio to run my project.
What should I do?
If you still have got a build.gradle file for the desktop configuration, execute the "dist" build configuration via gradle. As a result, a runnable jar file will be created.
If you do not know how to achieve this in Android Studio, this can be easily done from the command prompt:
swich to your projects directory
./gradlew desktop:dist
I would like to merge our Java (Android) development with the Delphi XE7 mobile (FMX) project, and seems like the best way is to have a JAR which contains a whole Java based mobile application.
Is it possible to compile Android project with it's intents and resources as JAR, and if it is - how to?
Based on this answer:
Android uses the Dalvik VM, whereas you need the Java VM to run a jar-file. So you can't run a jar-file on Android.
I am using EclipseME to write MIDlet application.
I have deployed by right click on Project->J2ME->Create Package.
After that, I copied Jad and Jar files in Deploy folder to My phone.
For BlackBerry: When I run Jad file, it is installed successful. And run ok.
For Android: When I run jar file, it popup message "open file failed".
Please tell me how to deploy MIDlet app by using Eclipse for all cell phone that can run it.
Android phones can't runt J2ME.
Directly you can't run Java ME application on android. But You can use some alternative ways like App runner or J2ab.
For Android you should develop an application using android sdk. Better you read the android documentation. Search android in google. It will help you.