• Post Reply Bookmark Topic Watch Topic
  • New Topic

[RESOLVED]urgent: jar file problem  RSS feed

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I created a jar file with a two main class file which are also the entry point to my application.The problem is I don't want to define the main-class (entry point) in manifest file rather I want to define it while running the jar file.

eg:
java -jar Power.jar com.test1
or java -jar Power.jar com.test2

Is this possible? If yes then how?

thanks in advance
[ December 17, 2005: Message edited by: himanshu bisht ]
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about

$java -cp Power.jar com.Test1
$java -cp Power.jar com.Test2
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about making a control class that always run, and then that calls either one depending on conditions?
 
Himanshu Bisht
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Jeff

thanx buddy!!!

this thing worked like cake.

work done
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!