• 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

what is the Ideal way to Start Stand Alone application?

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

I recently moved to Stand Alone application development project.

The way we are running the app currently is using ant i.e., we have .bat file which invokes ant and

in the default target of ANT's build xml we are invoking the Class which has the main method.

>> bat file

>>build.xml


Is this the good method to start the application?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ramesh Sunkara wrote:Is this the good method to start the application?


No, I would say that this is not a good way to start an application.

Ant is a build tool, it is meant to be used by software developers to automate the compilation and test process of complex applications. It's not meant to be a general tool to start Java applications.

It's better, and simpler, to make a simple batch file to start your program. For example:

 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Jesper de Jong,

Thanks for your suggestion.

If I start my application like you said how to handle with the 3rd party jars.

Say I have some 100 jars which must be in ClassPath.

Is it good to set classpath like this:
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ramesh Sunkara wrote:hi Jesper de Jong,

Thanks for your suggestion.

If I start my application like you said how to handle with the 3rd party jars.

Say I have some 100 jars which must be in ClassPath.

Is it good to set classpath like this:



Not really. There are ways, even in a bat-file, to search through a named library and add all the paths that match the pattern **/*.jar.

There are some really good tools to create a launcher for java applications. Both in Eclipse, IntelliJ and NetBeans you can export your app and have a launcher written for you.
 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I exported a launch file for my sample project


This is what I got?
How to use it? I have A jar in Build path. Where is it mentioned in this launch file?

There are some really good tools to create a launcher for java applications. Both in Eclipse, IntelliJ and NetBeans you can export your app and have a launcher written for you.


I don't want to run my application from Eclipse.
 
My cellmate was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic