• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the Ideal way to Start Stand Alone application?  RSS feed

 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16058
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • 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:
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!