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
Related
I have an application that works fine and that I can execute from a .jar file. But I want to know how to make it runnable from any computer even if there is no JRE or the JRE version is not the good one. I thought about a .exe file but don't know how to do it.
I made my code with Eclipse and it use jxl,jdom and jfx librairies.
I tried to use Inno Setup 5.5.6 but when in Eclipse I run my build.xml as Ant Build it return me an error that says :
"'Launching JFX Build - Myapp' has encountered a problem.
The achive : C:/Program%20Files/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150528.jar which is referenced by classpath, does not exist."
JavaFX provides specific utilities for bundling your application as a native package, which is referred to as "Self contained application packaging". These utilities are provided as a command-line tool, or as ant tasks. Additionally, the common IDEs support this via wizards, either out of the box (NetBeans) or via a plugin (e(fx)clipse for Eclipse). The details of how to use any of these are far beyond the scope of a stack overflow question, but the basic documentation is available here. A tutorial for e(fx)clipse is here.
Briefly, for e(fx)clipse, you should double-click the build.fxbuild file that is created in your project. Under the "Overview" tab, find the "Packaging format" option, and select "All" (or the specific type of package you want to create).
Note that you can only create a package targeted at the platform on which you are building, so if you want to create packages for windows, Mac, and Linux, you will need access to all three types of machine.
I know I am late. I faced same problem a trick worked for me. Look at the given directory in the error message. It contains a space (C:/Program Files/...). Move your e(fx)clipse to another directory where the directory doesn't contains any space.
Not sure it will work your everyone or not but it worked for me.
Thanks
There are various tools that let you wrap your Java application in a Windows executable. Some tools are only simple installers, others allow you to bundle your application with a specific JRE version.
A widely used but commercial tool is install4j, but there is a bunch of other tools, such as WinRun4J.
I have this little application (JAR) built in Java on Eclipse and it needs to be compiled into an executable file that people can just double-click and it runs. Ideally this would an exe filetype. I'm not so versed with java and what the needs are but I'm hoping it can be compiled to run one computers that maybe don't have java installed.
Is there any advice or direction you can point me to so I can figure this out?
Many thanks.
Ideally this would an exe filetype.
No, ideally this would be a Jar file. Just leave it be a jar file. It will work fine if you set up your platform to respond to double clicks correctly. And yes the computer will need to have Java installed -- that's not an onerous requirement.
Try this application : exe4j : http://www.ej-technologies.com/products/exe4j/overview.html
It runs on various platforms to made EXE files :))
You won't be able to make it run on PCs without Java installed.
There are plenty of guides on how to make an executable jar to run on computers with Java installed: take your pick: java executable jar creation, Make JAR as a standalone executable and so on...
You can try http://www.excelsior-usa.com/jet.html. It is free for non-commercial use.
I made a little minesweeper game and I want to send it to a friend so he can test it out. The problem(probably) is that he isn't able to run it because he doesn't have Java for programmers(JDK) installed on his computer. How is it possible to export a program that will work on other computers without having to download any other files**(other than JRE)**?
EDIT: I did read about converting the JAR to EXE but I couldn't find anything that would do it.
EDIT2: Download here the JAR file(it's only supposed to open a blank window). I tested it on two computers with JDK installed and it worked, whilst on two others without JDK(one with the newest JRE) it couldn't start. This is the error:
.
There is no way to "not have to download any other files" - your friend must minimally have some Java Runtime Environment (or just "Java") installed in order to run Java programs.
If your friend has Java installed, you can package your application as a fat JAR so that he only needs your JAR to run your application (depending on the application - but I think yours should be fine).
There are tools available, google "java windows executable" and you will find e.g.
Convert Java to EXE
http://jsmooth.sourceforge.net/
Or already on SO
How can I create a Windows .exe (standalone executable) using Java/Eclipse?
Java Web Start is ideal for this, as it can enable the user to install required components on supported platforms. There's a simple example here.
Not possible, a JRE (Java Runtime Environment) is the least that must be present.
If that is you can just export your program as jar specifying the main class in its manifest. Your friend should if a JRE is installed be able to run the jar file directly.
You could send your friend the compiled binary of your game. In that scenario, your friend will only need to have the Java Runtime Environment installed in order to play your game.
Make executable JAR from it, your friend will still need JRE.
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.
I've created a project in netbeans and I want it to be runnable in another computer without having the netbeans installed (just like a .exe in visual basic).
I pressed F11 and I got a lib folder which has a .jar file on it. But then I don't know how to work it out, which one do I have to double click?
Can anyone please guide me?
If you created a java project, then the "other" computer should have the java runtime installed, in order for the jar to be executed there (java -jar your.jar) otherwise if you really want an .exe use one of the many jar2exe converters found on the almighty internet, such as http://www.ucware.com/jexec/index.htm
To run jar file on other computer you should have at least jdk. Their is no need to install NetBeans but you have to first set database connectivity to pc and your database. After connectivity just double click on jar file your project will run.
To know how to create Jar file in NetBeans check this link.
What type of project is this Desktop application OR Web based application ? If you are using java then for Desktop application you need to create a *.JAR and for Web based : *.WAR.
There are simple step to create jar/ war. please follow any tutorial.