So I have watched several videos and read through many a forum post on installing libgdx with android development studio. Every time someone opens the gdx-setup.jar download there is a file within names gdx-setup.jar that you click on and brings up a setup project menu. However each time i download this file is missing and this is all I find within the download.
Here is a link to the picture of what I get when I open the libgdx download, (since I do not have the 10 reputation yet to include the picture in my post.)
https://i.imgur.com/9DHTKVo.png
Just trying to get this framework setup so I can start learning more about using it in game development.
This documentation explains how to run the downloaded setup-gdx.jar to create a new project.
I guess, you're missing the part (or your OS is not picking up the correct application to run the jar file with [should be java]) how to run the downloaded jar:
Open up your command line tool, go to the download folder and run:
java -jar gdx-setup.jar
After that, if your OS has java or jre or jdk installed and configured correctly (JAVA_HOME variable set and exported) you should be able to see the UI.
Related
I used to work on an IntelliJ project that was started before I started working on it. This project had a configuration that allowed me to generate an EXE file that could easily be sent to windows users.
It would generate a massive EXE file bundled with all the needed JARs of the application, and upon running it the first time, it would silently "install" itself into the AppData folder, as if it were a regular windows setup file, even though the user would not even notice it doing that installation.
I am trying to configure a project in IntelliJ to do the exact same thing, but first I have not been able to output the exe file by selecting "exe" as the Java FX native bundle type. It just generates a .jnlp and .jar file. When I select "all", as per some other post here in stackoverflow, it generates an exe file, but only with a few kb in size, which does not contain any of the .jar files that should be part of it. Moreover, when I try to open it, it just crashes saying the main class was not found.
Am I missing some setting for building the project? I am using IntelliJ 2018.3.2
Here are some screenshots:
I have been able to get past this error, after changing the verbosity of the compilation and going through the logs.
There was a log message which helped fixing this:
The process complained about the Inno Setup Compiler missing, which was right. Makes me wonder why IntelliJ would have that feature built in if it depends on external tools but does not notify the user clearly of this.
Detected [iscc.exe] version 0.0 but version 5.0 is required.
After going to the Inno Setup site, downloading and installing the tool, I was able to get the executable to be generated.
Now I am struggling with another error, which is the executable complaining about the main class referenced in the Artifact not being found, but at least I have moved past the first problem! Going to tackle this one now...
The best solution for this is using exe generator software.
There is plenty of exe generators out there.
EXE4J is the most simple & easy tool to use.
In EXE4J,
You can upload your main jar file and select the main class.
I think this will be solved your problem.
This may be due to you`ve extracted Jars to your output root, while you neet to Put it(you can check difference by deleting everything from your output root in Output Layout screen and then just right click on jar on the right side, you will see two options here, try another one
I started to write code in Java few weeks ago. I use IntelliJ Idea (the latest version) on Win10x64.
I realized a little hangman game (as a Windows command line app) that uses a text file with the words and I have put this text file in a folder called 'assets' inside the project folder (at the same level of 'src' folder). The game works great in the IDE environment but I still don't know how to realize a standalone app and running it outside IntelliJ.
I tried also to compile from command line using javac.exe and it seems that compilation works well but when I try to execute the program from command line using java.exe I get an error that says that the text file I use as vocabulary is not found (java.nio.file.NoSuchFileException).
I have also followed the instructions on Jet Brains site about How to create a JAR file but with no results. Is there a simple way to deploy a Java desktop application so that people (who obviously have JRE) have just to make a double click on an icon and use it?
I created a small swing application having some GUI components and some java code. When I run it from the IDE, I see GUI open and it works as expected. Now I want to distribute this application to others and it will be run on different machines. I am just wondering as how could I distribute it?
Under project folder, I see following -
-dist
--lib
----some required jar files
--project.jar
-build
--classes
----packagename folder -->UI classes
----projectnamefolder--->projectname.class
--empty
--generated-sources
I am using Windows 7 64 bit with jdk 1.7. Earlier I was able to distribute such apps and they worked from command line or by double clicking .jar file.
Is there anything different in case of swing apps? Kindly suggest.
If I run from command prompt the jar file located under dist folder, it doesn't throw any error but no GUI appears.
Follow these Steps in LINK and other system will need JRE to run.
I think you are missing swing-layout-1.0.jar
To add the Swing Layout Extensions library:
Right-click the project's Libraries node and choose Add Library.
In the Add Library dialog box, select Swing Extensions Layout and click Add Library.
Click OK to close the Project Properties dialog box.
Additional to doing what Shiv suggested, I followed link , and it clicked to me as what was i doing wrong.
Now I want to distribute this application to others and it will be run on different machines. I am just wondering as how could I distribute it?
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & *nix.
..sounds cool, would search some tutorials as to see how to use it
The info. page at SO linked above includes the collected knowledge of the SO poster who has the most up-votes for JWS ( me ;) ). It also includes a list of links to tutorials and other information.
I have written a program which I used Java Media Framework (JMF) Library to capture video from camera and display the video, when I run the program in Eclipse it work will, but when I export the program as runnable jar file, then the program cannot detect the device. I have done some experiment which I will share with you below.
I installed JFM in C drive and I add the libraries from C drive to Eclipse (C:\Program Files\JMF2.1.1e\lib) in this case the program run from Eclipse working will, but when I copied the libraries from (C:\Program Files\JMF2.1.1e\lib) to inside the project in Eclipse, then the same problem happen which cannot detect the device.
Now I don’t know how to solve this problem, if anyone knows about this can suggest me.
Thanks in Advance!
I have tried all below three options to export, but the same problem happened:
But when I select the first option then Eclipse warn as below:
I've created a game project in NetBeans 6.9, and I want to run the project on another computer. The problem is if NetBeans is not installed on the other computer then surely I cannot run the project.
Therefore I have to convert my project into a .exe that can be run on other computers without having to install NetBeans.
Is there a free application that can convert .java to .exe?
Please help me to convert my project into a .exe file. Thanks.
Check out these official netbeans article for Packaging and Deploying Desktop Java Applications and Developing General Java Applications.
From the article
Running the Application Inside of the IDE
When developing applications in the IDE, typically you will need to test and refine them before distributing them. You can easily test an application that you are working on by running the application from the IDE.
To run the AnotherGrep project in the IDE, right-clicking the project's node (AnotherGrep) in the Projects window and choose Run Project.
The xGrep window should open. You can click the Browse button to choose a file in which to search for a text pattern. In the Search Pattern field, type text or a regular expression pattern that you would like to match, and click Search. The results of each match will appear in the xGrep window's Output area.
Information on regular expressions that you can use in this application are available here and in many other places on the World Wide Web.
Running the Application Outside of the IDE
Once you have finished developing the application and before you distribute it, you will probably want to make sure that the application also works outside of the IDE.
You can run the application outside of the IDE by following these steps:
In your system's file manager (for example, in the My Computer window on Windows XP systems), navigate to PROJECT_HOME/dist and double-click the AnotherGrep.jar file.
You will know that the application has started successfully when the xGrep window opens.
If the xGrep window does not open, your system probably does not have a file association between JAR files and the Java Runtime Environment. See Troubleshooting JAR File Associations.
Distributing the Application to Other Users
Now that you have verified that the application works outside of the IDE, you are ready to distribute it.
You can distribute the application by following these steps:
1: Create a zip file that contains the application JAR file (AnotherGrep.jar) and the accompanying lib folder that contains swing-layout-1.0.jar.
2: Send the file to the people who will use the application. Instruct them to unpack the zip file, making sure that the AnotherGrep.jar file and the lib folder are in the same folder.
The users of your application should be able to run it by double-clicking the JAR file. If this does not work for them, show them the information in the Troubleshooting JAR File Associations section.
Also some third party tools like Launch4j may do the trick. For more information see this article on java-to-exe
See Launch4j. I dislike starting java apps with a batch file. This wraps anything from the root jar all the way up to a complete Java environment in an exe. You get your own icon in the system tray rather than the generic coffee cup. I've used it successfully on a project that has about 300,000 downloads, and it's never been the source of a reported bug. NB It does take some careful reading to pick the right options for your project. But you can set it up with the Ant build script in Netbeans to make the .exe automatically. Very nice and clean. My project includes native libraries. They work fine as well.
I think the NSIS will help you . Most of the applications using NSIS. Because it is open source.
Also there is a Eclipse plugin for NSIS to make the process easy.
http://hmne.sourceforge.net/