How to assure windows that my app is safe to run? - java

For my college project, I created a MapGenerator to create maps for the project. It is a group project, so I converted my .java files to .exe using Launch4J.
I then shared it to my friends using Google Drive. But then, while downloading, my friends said that Google said that the download is potentially dangerous. They just selected "Keep" and continued the download. The problem came when Windows doesn't let them to run that app at all. We know it's a safe application and does nothing wrong other than creating .csv files.
So, is there any way to assure Windows that this is a safe application and allow it to run the application?
PS: I use IntelliJ without gradle or maven, just IntelliJ (if this is a necessary info)

You can select the exe you want to run --> Click properties --> Under the general tab beside the security option --> check the unblock. Then it should definitely run
To have your exe like other software , you have to get your exe signed but I don't know how to do it. The solution I gave is a duct tape glue solution and I thought it would help.
You can check this link for more info:-
Signing a Windows EXE file

Related

Converted jar to exe file but not working after installation

I converted my first java swing app to exe using advanced installer and inno setup(Tried both no result).
Considering Inno Setup : on double clicking nothing happens
Considering : Advanced Installer -> On executing my app open but after providing credentials nothing happens so i assume it may be database issue.
About my app: It is a small swing based saving and retrieving data of employees payment.
Database used : MySQL
I had imported database schema to client PC and made .exe file of app so that after installing it can access data.
The Jar files runs successfully and able to access the data as well.
So i think while creating .exe is their anything to be done about database .
Please suggest me where i am mistaken .
Download Launcher4J Software and build Exe out of jar file!
This is the Best and all fixes will done!
I think this is more like an application issue rather than an installer generated one. Have you tried to debug your application code after it is deployed using a setup package?
Also, in Advanced Installer, under Java Products view of your project there is a Virtual Machine section where you can choose to save the output and error stream in a log file. The log file will be created at app runtime just beside the EXE launcher. Maybe this will help you to catch some errors logged.

How to export my program into a runnable desktop file?

first time posting here, java beginner.
I made a basic calculator that receives user input. Is there a way to export my program to make a runnable desktop file?
My IDE is IntelliJ.
Thanks in advance!!
Assuming you are building a JavaFX app:
The easiest way to deploy your app is to go to File>Project Structure>Artifacts.
Add your available elements (if you have any extra images etc) into your output root, and click on your jar file. At the bottom of the window you'll see options to either create a manifest file or modify an existing one.
The manifest file describes the first class to load in your program (the starting point) as well as the locations of any third party libraries you may have included in your program.
You will also have a JavaFX tab that you can use to set some initial parameters for your app, such as the title, version, and whether you want to deploy any native bundles (eg: .exe for Windows, .deb for Ubuntu etc)
Once you have configured the important parameters you want, save your settings (or just select any field and click enter) and go to Build>Build Artifacts>Action: Build
IntelliJ should generate an executable .jar file and any native bundles you selected. The native bundles can just be double clicked, and the jar file can be run using a JRE.
On blog.jetbrains.com they show the steps with some screenshots.
Note that this entire process is called deploying your app and there are a variety of tools and methods to do it. I just described what I believe is the simplest way.

How to set a classpath automatically during the installation of an excutable java application?

I am writing down an example of what I was trying to do.
But this is just one example, I am sure there would be many. So I want a generalised answer for this.
I was trying to make a java desktop application which reads the word documents. I realized I need some Apache libraries/APIs that would help me do it.
So I downloaded the library.
But now I need to set the classpath of the files from the library.
I am a developer and I can do it, but imagine giving such instructions of setting a classpath to a complete non-developer user.
I was wondering if when I am over with the making of this java application, I would make it executable (exe) application and when someone installs it, the classpaths are set automatically during the installation and the apache library files are automatically extracted.
How can I do it? Can someone explain me in detail - step-by-step?
Please consider using some development IDE, like (free) eclipse for instance.
Then crate new folder (clled lib for example) in your project, copy the library into it,
then click on your library by the right button and select "add to build path"
As already mentioned - best way to do it is to use Manifest file in your jar. Official documentation: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

How do I package a Java program for Ubuntu?

I have an application that currently a user downloads and runs an install script. I want to be able to take the JAR file and such that is generated by NetBeans and make it into a package that a user can download through a package manager. It needs to have menus implemented as well (the entries in the Debian menu that the user can click on).
Currently I am following through this tutorial: http://packaging.ubuntu.com/html/packaging-new-software.html
However, I am worried that I am going down some kind of rabbit hole in the wrong direction. Surely this must be something that is common?
What is the standard procedure for getting your JAR file to other people through packages?
I needed to:
Install dpkg.
Create a directory structure similar to how I would like it unpacked.
Create a shell script that would copy it there.
Run dpkg.

Best way to update jar for users?

I have a game that is an executable jar file. The problem is, users need to manually download the newest version of the jar when there is an update.
As far as I know, I will need to make some sort of launcher that downloads the newest jar from my webserver and launches it. What is the best approach to doing this?
What I had in mind was creating another java application that downloads the game.jar to some behind the scenes directory and runs it.

Categories

Resources