I am new to eclipse + Java. I am trying to create executable jar file with eclipse
export option. It works very well. But in my project, I have almost 10 packages (my own) and 4 main classes. I want to create a executable jar file that can execute any of main class from 4 main classes.
For example: Double click write class name and run that class
Just a quick example of how to deal with command line options to launch different things, I would have put it into a reply to @serplat’s answer but then I can’t format it.
There are much better ways to handle command line stuff, but this is understandable and should do what you need. Later you might look into something more flexible.