• 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

Publishing a java "executable"

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all:

I know that it's technically wrong to say "executable" for a java application. But, how can I publish an application?

Say, I've written a project in java, and it has multiple files. I compile it, and have .class files. I then run the .class files, I see the application launched. But is there any way to convert (or whatever) all the .class files into one file(for instance, a .jnlp file) so that people can run it directly using jvm?

An example would be this:
http://download.oracle.com/javase/tutorial/uiswing/examples/components/index.html#Converter


When you click "launch", a jnlp file is actually downloaded or run, depending on user's choice. How can I make my project into a similar form so that people can directly run it from my site?

Thanks for any inputs.
 
Sheriff
Posts: 7135
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Castor Tack wrote:...is there any way to convert (or whatever) all the .class files into one file(for instance, a .jnlp file) so that people can run it directly using jvm?



A JAR file can do that. Particularly, if Main-Class attribute is specified in MANIFEST.MF file of the JAR, you can specify which class to be executed at the first place.

JNLP is a protocol used for distributing Java Web Start applications. That is useful especially when you distribute your application over the web. Have a look at this tutorial for more details of creating Java Web Start applications
 
Castor Tack
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, man!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This explains how to make an executable JAR: Packaging Programs in JAR Files
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic