Making EXE Installer from Netbeans 8.0 - java

I'm trying to make my java application distributable.But when trying to package as exe installer from netbeans I'm getting this error. Can't understand how to do it. please help. thank you
Detected JavaFX Ant API version 1.3
Execute failed: java.io.IOException: Cannot run program "iscc" (in directory "C:\Users\Hansi\Documents\NetBeansProjects\medical"): CreateProcess error=2, The system cannot find the file specified
C:\Users\Hansi\Documents\NetBeansProjects\medical\nbproject\build-native.xml:441: Error:
JavaFX native packager requires external Inno Setup 5+ tools installed and included on PATH to create EXE installer. See http://www.jrsoftware.org/

It appears that what you are invoking wants to run a program on your system which you don't have.
You need to install that program properly so it can be invoked manually from the command line, and try again. Instructions can be found in the stack trace. If the website is down you will need to find an alternate source.

Related

Cannot open .jar files with java installed (windows 11)

Environment: Windows 11
Problem: cannot open .jar file(the MARS assembly language simulator)
Hello, I am currently trying to install the MARS assembly language simulator. It is a .jar file so I downloaded java to open it. However, I still can't open the file even with java downloaded.
I checked if java was installed using my cmd:
Command prompt showing java successfully installed
I tried double-clicking it did not work. So I right-clicked it to open with other apps. But I did not see java in the given options.
Cannot find the java option to open the file
Thank you so much for helping!
Use your prompt
CD into the directory with the jar
then execute
java -jar Mars.jar
...any more troubles , open file properties tab with right click on the jar and check permissions to execute the file.
Installing Java usually means installing a JVM, which is a Java Virtual Machine. You won't be able to launch files from a Windows context menu like this, because "Java" is not a program that opens files.
Instead you need to:
Either a terminal and call javaw.exe with the parameters -jar and your .jar-file. E.g.:
C:\your\java\binaries\javaw.exe -jar -SomeJarFile.jar
Or add the Java installation to your environment variables, then you can call javaw.exe without providing some specific path

Create executable OSX file on Windows for .jar file

I have created a java program (in Eclipse). I have successfully compiled it to a .jar file which I can run on windows without any problems. I want to give this program to a friend who has a MacOSX. So my aim is to:
Create a file which can be run on MacOSX
The twist is that I have to configure it on my Windows computer since I don't have access to a Mac. Any advice would be of great help!
I am not sure what you are referring as "create a file which can be run on macOSX"
If you want to run on any OS you just need a JRE on that particular system without it you cant run. It will provide a runtime environment to run a jar file. Then use below command to run the jar.
java -jar Myjar_file.jar

Open a java12 jar file while 8 is still installed

Is it possible to create a executable jar file coded in java12 while java8 is still installed?
We use java8 in university but privatly im coding in 12 and so i need to find a way to run a private coded program through a jar file (created with artifacts through intellij) but still keep the java8 installment for university.
i tried this command
start javaw -jar jogurtLaunch.jar
and i tried rightclick and 'open with' and using the java12 exe (both java.exe and javaw.exe), but nothing happens except for the windows cmd prompt popping up for a few milliseconds in case of the exe and a jvm error ('Error: A JNI error has occurred, please check your installation and try again') popping up in case of the command.
Also i'd prefer a solution that is usable on all computers and not just for java12 development pcs.
Is there a way or do i have to code it in java8?

Launch4j exception error

I have a Java jar of which I would like to turn into a .exe file for Windows. Only problem is that I get the following error when building it through Launch4j on Linux net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/Desktop/launch4j/bin/windres": error=2, No such file or directory. I am not completely sure what is wrong, as I have tried to use the same Launch4j setup along with the same jar with Launch4j but on a Mac instead, which worked perfectly.
I have tried to search for the error on Google, but I wasn't able to get any results and on the Source-forge page with the actual download link, there are no one who have mentioned this error, at least it seems.
To me it appears as if there is something missing in the Launch4j folder? When launching the Launch4j jar to use the program, I am using the following command in the Linux terminal Java -jar launch4j and the program does open, the error first appears when trying to build the executable.
I had the same problem with launch4j on MACOS while using the launch4j ant task. I could solve the problem by copying (not moving) the macos executable located in the launch4j/bin to a newly created sub director launch4j/bin/mac. So I have got:
-launch4j/bin
ld
windres
-mac
ld
windres

java.lang.RuntimeException: Registry initialization file not found

When I work with JAI from the Eclipse (all the classes specified)
it works very fine, but when I bundle everything in a jar and make a shell script file from that and try to run that script I have a problem with javax.media.jai.OperationRegistry
looking for a initialization file.
Has anyone else seen this problem?
Exception:
java.lang.RuntimeException: Registry initialization file not found.
at
javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:365)
at javax.media.jai.JAI.(JAI.java:566)
There is something on this page but I was not able to understand.
Any Help?
So the problem is that the JAI jar exported with the Java application do not work on the Linux. We have to explicitly install JAI on the Linux machine for the installed Java application to use.
The one solution that we found out is we exported our Java Application into a jar file and created a installation script, which when run on the Linux machine install the JAI first and after that it install our application.
So this is a one time installation process while installing the application on any fresh Linux machine.

Categories

Resources