• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Executable Java program

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I was wondering how i could make a Java program have a .exe executable file to start it. The only way that i know of to run a Java program is to do it via command line. This is difficult to do in school because i have to hack into command prompt to do so and risk the possibility of being expelled. So i wanted to know if you could make an executable file for java or if there was anyway to run the program that doesnt involve the command line, or an ide for that matter. Thank you in advance for your help.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an inbuilt tool in Windows for creating an exe file i.e iexpress. Here are the steps to use it.

Hope this helps.

Thanks and Regards,
Suhas
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is suprisingly simple....

Install java in a windows machine.

Now, all jars are like Executables, you just double click them and they execute (assuming that you have properly packed them with a manifest file stating your main class)

This jar file can be executed in other platforms too.
You dont need to "hack" command line, etc...
 
salvin francis
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as an example,

open the demo folder inside jdk installation and goto one of the sub folders eg: Stylepad and double click Stylepad.jar it should execute.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Turning a jar into an exe is going to tie you down to Windoze platforms.
Salvin is correct. You can make your jar an executable by modifying the manifest file to incorporate the Main-Class attribute. Search the forums. This problem has been discussed and the solution provided before.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd also question why keeping someone away from tools and exploration is grounds for expulsion--seems like that's something we'd want to *foster*, not punish.
 
Cody Long
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:I'd also question why keeping someone away from tools and exploration is grounds for expulsion--seems like that's something we'd want to *foster*, not punish.



There have been too many malicious hackers at my school. people have been in the middle of tests they need to do to graduate and people have remotely shutdown their computers. As of now i am the only student who knows how to get to the command line. If word ever gets out i could get expelled because they know i know and that i am the only one. It is also good to impress my friends with it. but every time i do my chances of expulsion get higher. even though i am only watching star wars, pinging google, or running my java programs. thank you for all of your help! :beerchug: :jumpingjoy:
 
salvin francis
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cody Long wrote:There have been too many malicious hackers at my school. people have been in the middle of tests they need to do to graduate and people have remotely shutdown their computers. As of now i am the only student who knows how to get to the command line. If word ever gets out i could get expelled because they know i know and that i am the only one. It is also good to impress my friends with it. but every time i do my chances of expulsion get higher. even though i am only watching star wars, pinging google, or running my java programs. thank you for all of your help! :beerchug: :jumpingjoy:


WOW ! opening Windows command line brands you as a hacker !

Whatever happened to all those guys enveloped in *nix terminals with screens of gushing code in the vi editor (ah! those days !!) ?

My answer was basically around this statement:

Cody Long wrote:The only way that i know of to run a Java program is to do it via command line



As a side note, your school actually remind me of that guy doing Third year in computer science in my college, who when asked to open the command prompt,
went to start > Run and typed "dos" and then starting fuming about system curruption since the machine said
"Windows cannot find 'dos'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search." :D :D :D

 
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic