How to generate apk file in NetBeans? - java

How can I generate the apk file in NetBeans? Should I install some plug-ins? I already have the Android one. Or should I write something in command prompt? Is it a special one? How can i start it? Thank you!

If I wanted just to build APK I'd rather use command line directly. If you want to build and run your Android application using NetBeans then building APK is just part of that and it is possible with NBAndroid plugin. You can check brief documentation at http://nbandroid.org/wiki/index.php/NBAndroid#Deployment_to_a_device

Related

Pin a Java program created with Netbeans on taskbar?

Good evening!
I want to create a program in NetBeans which I can pin to my taskbar without detours. I just want to pull the program in my taskbar, but if I just build the project it isn't possible. Can someone tell me, what I have to add to my code or what do I have to click in NetBeans to be able to do this?
Thanks!
If you want to run your code without using IDE, you can use the command prompt to do this, or you can make an .exe file of your code, so you can run it as a windows application (with the double-click).
Here is the name of some programs that convert java file to .exe file:
JSmooth - JarToExe - Executor - Advanced Installer - Launch4j - Install4j
Hope this help.
You can even build the project as a standalone .jar file, and then simply create a shortcut to the file and pin it to your taskbar that way.
I haven't used NetBeans in ages, but in eclipse it's under the export menu.

How to get app version from apk file using JAVA eclipse

Is there any way that I can get the app version from apk file
using JAVA eclipse?
thanks for your time!
You can extract the apk via 7zip/WinRAR and then open the folder with sublime and then look for version. You will get a hit if you are lucky.
The concrete way would be to decompile it and then do a search.

Java project won't compile to a JAR correctly for Android

in an app I'm working on I have an issue with a Java library which is here - https://github.com/kennydude/Boid-Twitter-API
When I run ant android which builds an Android package it builds fine and Eclipse can read the Jar fine.
But on my device it says that dalvik cannot locate any of the classes and eventually throws a ClassDef Exception.
I have used Jars before, so I'm wondering if it's my ant file that's broken
I would open your app project in eclipse (the one that depends on the Java library that is not found at run-time) and add the jar file the Java library produced to its build path. Then execute
android -s update project -p .
in the same directory as your apps' Manifest.xml file in order do generate ant build files.
After this, you should be able to build your app using ant by doing
ant debug
or
ant release
I fixed it by ensuring Ant was compiling to 1.6 of Java which is my target in Eclipse for the application.
Perhaps you're not placing your jar in the libs directory as opposed to lib directory? Here's a similar issue Java (Android) - class not found exception
First of all to build an apk with ant for Android you have to use ant debug or ant release, i don't know what ant android does and why you are using it but this command is not part of the standard approach to ant for Android, that's for sure.
Ant is just a building tools, if a developer provide a building solution in ant, does not mean that his application is for Android.
Under Android everything that is not a native library is converted in a DEX object, which is something similar to bytecode for the Dalvik, there is no jar or other container in your app.
This question may be helpful for you Adding a library/JAR to an Eclipse Android project .
There are a lot of conceptual errors in this topic, you probably want to study the Android platform before using it.

Deploying a JAVA project to client

I'm currently working on a project on Java Applet, Frames and now i have to deploy it. But the problem is this how can i hide the source code of the project? I've to deploy it to a local user on Windows OS. How can i make the .exe of the code?
There are many options you have.
If you just want to wrap the Java code in an executable file that works in Windows. You have:
Launch4j
JSmooth
Both are good.
If you want to wrap as a service so that you can perform myapp.bat {install|start|stop}, you have
Java Service Wrapper
If you just want to have a couple of bat/shell scripts auto generated at the build time that will launch your app on double clicking. You may look into Maven, there is a good Maven plugin called AppAssembler
Maven AppAssembler Plugin
The best tool for building .exe is InstallJammer
It also provides wizard type installation with all options.

How to make installer pack of Java swing Application Project?

I've created a java project using swing application with JMF. I've tried to convert it into package but it failed.
The jar can be created but it won't work in other computer (Windows). Can someone know the answer? Please tell me.
I need to package the project as installer and it would work in other system. Guide me for this.
This link gives a list of opensource installers for java applications:
http://java-source.net/open-source/installer-generators
I'd recommend izpack, its used by a lot of software like jedit, scala installer, etc.
You can try install4j. (Its not free though, you may try evaluation version first)
Here is list of Open Source Installers Generators in Java :
http://java-source.net/open-source/installer-generators
I have used Install4j and it works
You can use the install4j for the create exe file for jar file of java project and use the Inno Setup Compiler file for create the installer for the project.
this ts Youtube vedio for the how to create the exe and installer
video for create the exe and installer

Categories