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
Related
I am new to java working on voip project linphone-desktop(cross-platform) project. I can generate the build files from the code available on the github. I can install linphone-Desktop application from the dmg file in my system but not sure from where I can find the dylib file to use it in my project to customize the linphone-desktop application as per my requirement.
Firstly, I have tried to use the dll file on my macos but later I have found that dll file on macos can be used through the WINE only but I am using MacOS 10.15(Catelina) on which wine is not supported.
Listing few links which I have already visited.
https://www.chilkatsoft.com/java-loadlibrary-windows.asp
dll can be loaded on MAC os
Loading DLL in java in UNIX system
Any help would be highly appreciated.
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.
I have created a spring application which uses google or-tools. For that, I am importing jniortools using System.loadLibrary("jniortools"). when I provide the .dll file and run the war file it runs perfectly. But when I provide the .so file path in lib, I get the unsatisfiedlinkerror.
Taken from here, a solution for using or-tools over Intellij:
To make it work using Intellij (over a windows machine) you need to:
Install Microsoft Visual C++ Redistributable for Visual Studio
Download and extract the OR-Tools library for Java
In intellij, add jar dependency to the 2 jars under the lib folder of the extracted files (each of the 2 jars separately, do not add to lib folder itself. This is why).
Add the lib library path to VM options. In Intellij edit your run-configuration and add to vm options: -Djava.library.path=<path to the lib folder that hold the jars>
Load the jni library statically by adding the below code to your class (as mentioned here.)
static {
System.loadLibrary("jniortools");
}
I built .jar files of my application. Now I want to share them with my friends.
Do I just copy that .jar file over to my friend's system? If not, what else has to be done?
yes your can share the .jar file by just copy to the new system
if he/she is installed the particular version or latest version of java he/she can run that application
you can also wrap the .jar files into .exe file using some third party applicaion
In your comments you stated that the .jar files are unzipping and not running on your friends' computers.
This is usually caused by Java not being installed on their computers. They should get the Java SE Runtime Environment from Oracle and install it. Afterwards, the jar files can be run with a double-click.
If your friends already have Java installed, they might have to fix their file associations (so .jar files no longer open with their ZIP tool).
Yes if you created an executable jar it is possible to execute it if the operating system of your friends supports java.
If they need only to use your jar as a library they can import it in their project.
Yes just copy it to your friends machine. That is what jar files are made for.
The reason behind , your jar file is being opened as a zip file , may be your friend have set some unzip tool as a default application to open jar files. Try to open it with JAVA .
I had completed building a .jar file for me project (media player), it is also running successfully with command line java -jar mediaplayer.jar.
But now i need to make an installer, so what all files do I need for making an installer, do i need to bundle the lib files also with the installer.
also when i launch my .jar file with Java Web Start, it says "Unable to launch application"
You definitely need to bundle both your mediaplayer.jar and the libraries in your classpath. You will also need to generate a native executable file that will at least do java -jar mediaplayer.jar.
Usually native launchers also check if Java is installed on the target machine and help user to install it if it is not.