Convert netbeans project with embedded databases to a stand alone java program - java

I have a very complex java program written with net beans 7.1. It consists of 1 .java file that has a main(), and over 25 supporting .java files (most used for routines inside of tabs). In addition there are 15 different databases (embedded) associated with it. The program is virtually complete, and I need to export this project to a stand-alone Java application (including the databases) that is completely independent of net beans and may run on any system that supports Java. This is intended to be a desktop application, not a web based program.
I am a fairly experienced programmer, however this is my first attempt in writing programs in java. If I could get links that may provide step-by-step procedures and/or examples that would be the most help. Or even better if there are software apps out there that would take the net beans code and generate a executable program.
Any assistance or advice will be greatly appreciated.

You must try out a free software named 'JavaExe' which can convert jarfiles (or java classes)
directly into .exe
Vikrant
(India)

When you build it, the stand-alone program should appear in a "dist" folder.
If you have problems with running this program, I am afraid, you have to write your own ant/maven script.

Related

How to package all required libraries with .so file linux

I am attempting to port an application that was written with a combination of c++ for the back end, and java for the front end. This application relies on the library opencv 2.4.13, which is outdated, as well as multiple other libraries. The concern i have is that i do not want the end user to need to install these dependant programs, as they have been proving challenging to install on any but a select few linux distributions. I believe the term i am looking for is statically linking, but i'm a bit unfamiliar with c++ compilation at the moment, so i am unsure the steps i need to take to make these files portable. The java application requires these files to be libraries, and while i have managed to get them to compile on one machine, the problem seems to be getting them to run on a different one after compilation.
Don't bother - this might also give you licensing problems, depending on what libraries you need.
Instead, just figure out what platforms your application is supposed to run on and package the libraries for each platform with your jar - or download them at startup, or provide them as a separate package. The exact mechanics you choose depend on your use case, the point is you don't need to rely on system wide installs.

Security Concerns with NetLogo

I'm quite new to NetLogo, but I'm very interested in learning more about it. Currently I'm trying to get my company to allow it to be installed on our corporate network, however I'm being denied by IT security because "The product is capable of producing stand-alone executables."
So my questions to you guys are:
Is NetLogo capable of compiling java code, or does it merely use externally-created (via another not included program) JAR files as extensions?
Are any of the programs (Netlogo, Netlogo 3D, HubNet, or Behaviorsearch) included with the NetLogo 64 or 32-bit installers capable of creating standalone executables?
Do you know of any way to leverage the Netlogo suite for malicious purposes?
Thanks for taking the time to read this. Any help would be greatly appreciated.
-Jeff
Previous versions of NetLogo were able to create a jar file that ran the model without having NetLogo on the computer. I believe this has been depreciated, but it might be the source of the concern.
This seems to be in reference to NetLogo applets. It's true that the newest versions of NetLogo don't allow making applets anymore. But even in the older versions that have applets, the NetLogoLite.jar file used is precompiled and is always the same, only the .nlogo file varies from model to model.
Is NetLogo capable of compiling java code
no
or does it merely use externally-created (via another not included program) JAR files as extensions?
yes
Are any of the programs (Netlogo, Netlogo 3D, HubNet, or Behaviorsearch) included with the NetLogo 64 or 32-bit installers capable of creating standalone executables?
no
Do you know of any way to leverage the Netlogo suite for malicious purposes?
Yes, you can write an .nlogo file that does something malicious when run (run within NetLogo, not standalone), most easily by using the https://github.com/NetLogo/Shell-Extension/ . You could even put the malicious code in the model's startup procedure.

Spring Boot Embedded Tomcat Application As a Windows exe file

I am developing an application using spring boot with embedded tomcat. Once I build this app in to jar file, I can run the application without any issue.
However, I need this application to be wrapped as a windows executable file. And my requirements are as follows.
Should be able to wrap the jar file as a windows exe file
All class files should be hidden or encrypted
Has anyone done this before? Any suggested tool for this?
UPDATE
Thanks to Dmitry in the comments. There has been an article released since this answer with instructions on how to use excelsiorjet specifically with Spring Boot.
https://www.excelsiorjet.com/kb/38/
It's a paid tool(Can be free or reduced cost based on your reason for using it and company size) but for your requirements this seems to be a pretty good option.
http://www.excelsiorjet.com/
Quote from their site
"Excelsior JET enables you to distribute and deploy your Java™ applications as optimized native executables that start and work faster, do not depend on the JRE, and are as difficult to reverse engineer as if they were written in C++."
I used this like 3 or 4 years ago but we weren't too worried about it being decompiled so we ended up using launch4j. I don't remember any problems with it just we didn't wan't to pay how much it cost.

Deploy an application in exe format

I have been working on a freeware application named "Cyberoam Iview" that has two modules, one written in C and the other in JAVA. Just for you know, this is an online application that requires JDK,PostgreSql database,Apache Server to setup on any host system environment.
I tweaked some changes to the available source-code according to my requirement. After the changes, I want to deploy this application as a one single packaged file, like in ".exe" format. All it's pre-requisites are required to be bundled in a single ".exe" format so that when I run that ".exe" file on my system, it installs and setup every application that it requires to run like installing Postgresql, setting up Apache server environment, JDK.
I read many posts and discussions, and thus tried my hands with CYGWIN tool to deploy the application, but failed to do so.
Suggestions are most welcome. Thanks in advance.
You can take a look at JSMooth. I use this for this purpose. You can create a standalone executeable and it even provides a downloader if no Java is installed.
I have some good experiences with IzPack installer and I can highly recommend it. You can check out my short and simple tutorial at Softwarepassion website - I guess a bit outdated tho.
You should be able to pack your jars and all external files as a single file

How to distribute Java-based software?

Now, don't get me wrong, I am a very competent programmer, but when I program, I typically develop things for the web using scripting languages like JavaScript, PHP, Python, SQL, etc. If I want to develop Java software (I am relatively experienced in Java), how do I distribute it?
Is there any good way to package up Java software in a nice little executable, send it out, and have it run? Alternatively, is there any good way to package up Java in some sort of installer, and send it out to be installed and run?
I'm using Launch4J http://launch4j.sourceforge.net/ it will generate an .exe executable for Windows, if the targeted system don't have JVM, it will tell user to download and get JVM.
You can package Java applications in so called jar-files using the jar tool or any competent Java IDE. These jar-files are self-contained and seldom need any installer.
These .jar files can easily be distributed and executed.
If you're used to web-development, you may also be interested in the Java Webstart technology.
Some links to get you started.
Export to a .jar-file in Eclipse
Lesson: Java Webstart
I have found two approaches to work well, depending on the needs of the end user.
1) Java WebStart - allows for central distribution and easy maintenance, but works best for online users. Require you to have a web site to locate the files - these days this is easy to do on the Google Application Engine.
2) Wrapping up the Java program in a single jar using one-jar, and then using jsmooth to generate an .EXE file which ensures Java is available, extracts the jar-file and invokes Java on it. This works well for users not always on the net, where you want the launch process to be transparent, but is less easy to upgrade than the webstart approach.
I use Maven to handle all the dependencies of my projects and that way when you utilise Maven to build your projects they will compile into one nice executable jar that contains everything so you dont need to worry about getting all your third-party jars in the right place etc.
There are a couple of ways: one is to create an installer that allows your user to install and run it. For this you can take a look at NSIS.... or you can just use Java Web Start where your user can just click the link and launch your application.
Here you will find a large set of options: Open Source Installers Generators in JavaIt is very useful for the "naive" customer or user of your application, to make the installation process as painless as possible. Let them install whatever is needed, DBMS, JVM, JMF and additional options via one installer.
You can also consider use one of the rich client platforms available for Java. The learning curve is probably a lot higher than just creating a jar file and ship it, but you will get a lot for free when it comes to distribution. (Think Eclipse with auto update through an update site).
Do a search for "Eclipse RCP" and "Netbeans RCP" and you'll find the two biggest contenders here. I also performed a serach for "eclipse RCP installer" and one of the hits seems interesting:
http://download.instantiations.com/RCPPackagerDoc/integration/latest/docs/html/gettingstarted/GenInstaller.html
I personally like izpack. It generates a jar file installer that you could wrap up in launch4j, supports things like windows specific shortcuts, is highly customisable through XML and hooks directly into ant.
OneJar is great for smaller stuff, but for larger programs or applications it's nowhere near as flexible and in my experience is rather slow.
Hello you can make an installer for your application.
In the link below you will find a nice help about izpack installer.
http://www.imrantariq.com/blog/?p=89
Link below contains a detailed pdf to make installer with izpack.
http://www.imrantariq.com/blog/?attachment_id=112
cheers

Categories