-4

I'm going to study java via the Book "Head First: Java".. So im going to use Eclipse, when I was in 3rd year college, we do very basic Java programming, we only used Notepad++ and command prompt for compiling.

I like to know if I can make exe using eclipse and java alone. What about GUIs? I only done application in android, so I code using "button.setText"" things, but what about Java application for desktop, how can I make GUIs? EXEs? Are there other programs I will use?

I would start creating simple PC apps like a calculator. How can I do that?

Unihedron
  • 10,902
  • 13
  • 62
  • 72
mcr619619
  • 435
  • 1
  • 4
  • 13
  • 3
    possible duplicate of [How can I convert my Java program to an .exe file?](http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file) – Spyral Aug 07 '13 at 11:58
  • 1
    check Spyral comment for the "Java to EXE" thing, the rest you are asking for is going to be answered in the book. – Alonso Dominguez Aug 07 '13 at 12:01
  • 1
    This is way too broad, try to narrow it down to something specific. – Joni Aug 07 '13 at 12:08

4 Answers4

2

Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one, and it's possible to set runtime options, like the initial/max heap size. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.

I would say launch4j is the best tool for converting a java source code(.java) to .exe file You can even bundle a jre with it for distribution and the exe can even be iconified. Although the size of application increases, it makes sure that the application will work perfectly even if the user does not have a jre installed.

Butani Vijay
  • 4,181
  • 2
  • 29
  • 61
1

If you only want to use Eclipse and java, then you probably should use SWT and, optionnally, RCP.

SWT is a native widget toolkit allowing you to build applications and RCP adds a framework layer to build complex applications like Eclipse itself and package them as exe (on windows).

But note that building desktop applications as exe is demanding. Before you dive into RCP you might want to look for other solutions, even if they require additional frameworks or tools you don't have in Eclipse.

Denys Séguret
  • 372,613
  • 87
  • 782
  • 758
0

To make GUIs Eclipse has Window Builder Pro, which allows you to make GUIs easily

https://developers.google.com/java-dev-tools/download-wbpro?hl=pt

For make an executable (jar, in Java case), Eclipse is enough. If you really want to build an ".exe" there are many plugins you can use, such as Launch4j

Diogo Moreira
  • 1,082
  • 2
  • 9
  • 24
0

For making drag and drop GUI, eclipse doesn't provide functionality. For drag and drop GUI, you have to go with Netbeans. For creating .exe, you have to use some third party jar to exe converter tool.

user2550754
  • 884
  • 8
  • 15
  • You are right - eclipse does not provide that functionality (eclipse is strictly speaking just a framework to create editors of all sort). The plugins for eclipse do that. See e.g. http://marketplace.eclipse.org/ – zapl Aug 07 '13 at 12:08