Jump to content

Executing java files

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1
DivideByZero

DivideByZero

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
How can I convert my "GUI.java" or "GUI.class" to a program that will run when I double click it?

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
You need to compile it into an executable file, such as a .exe file.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
DivideByZero

DivideByZero

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
how can you do that?

I've also seen some java programs run w/o being .exe like programs in Welcome to the new Sodaplay | sodaplay.com

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
If you want a program that can be run instantly from a web page, compile it into a JNLP file. Then, when the user clicks on the file, the browser offers to open it straight into Java's Web Start Launcher, so you can run the program straight away. It depends on the software you are using to create your software, as to how you compile it.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
DivideByZero

DivideByZero

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
oh ok. well I have a GUI program that I created with java and I really want to be able to just double click and launch it instead of running it through my compiler.

Can anyone give me steps on how to do it?

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
As I said, you need to compile it to an executable file. This may be labelled as 'Publish' or something similar. Take a look around the menus of the software you're using to create your program, and look for an option like the one described here.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
DivideByZero

DivideByZero

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
Where is that in eclipse?

#8
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I'm not sure, I've never used Eclipse. Take a look through the menus, and if you're still stuck, look at the help/support pages.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You can also associate .jar files with the java runtime environment, allowing you to double-click and "open" them with java.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I've tried running .jar files, but I get an error, So I use .exe files mostly.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums