1

Is there any .exe file like those VB creates for you which can be opened in different computers without any other app? created or can be created by Eclipse? I didn't find a thing in the project folder.

4
  • Look here How can I create a self-consistent .jar file with Eclipse? Commented Sep 24, 2013 at 21:56
  • Try to Google for "how to build an executable jar in eclipse". Once there, you're able to share this jar file and include it in other projects. There are even Youtube videos about this! Commented Sep 24, 2013 at 21:57
  • thank u both. i see there's an option for jar,used it and works flawlessly. correct me if im wrong but,it will still won't work on computers without java installed right? Commented Sep 24, 2013 at 22:03
  • i also saw that there's compilers which somehow does convert the project to exe.. Commented Sep 24, 2013 at 22:03

2 Answers 2

2

Java uses the "jar"-files as a container for executable binaries. But they require Java beeing installed on the target computer.

In Eclipse you can export you application via File -> Export -> Runnable JAR file Then you have to select the entry point (a class with a main-method) which should be called on running the jar-file.

On the target computer you can normally run the jar file by double-clicking it (Java SE is required to be installed). When that doesn't work you can manually call "java -jar container.jar" to execute the jar in the Java enviroment.

Sign up to request clarification or add additional context in comments.

Comments

1

Jar files are used for deployment but in order to run them you need the jvm. You can convert jar files to .exe .
I'm not sure if the conversion will result in the app running on computers with different OS'es (probably not) than the one in which the the .exe program was created in.
Here are some references
How to create an exe file in java.
How can I create a Windows .exe(standalone executable) using Java/Eclipse?.

2 Comments

Do you know any good jar to exe converter? btw i didnt quite understand what uve said about the inability to run on different OSs' - exe files only suitable to Windows based platforms..
exe files are not only suitable in Windows based platforms. They can be executed in every platform/OS you can imagine. Just by googling I found Launch4j.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.