You can create your jar without Main-Class in its Manifest file. Then :
java -cp MyJar.jar com.mycomp.myproj.dir2.MainClass2 /home/myhome/datasource.properties /home/myhome/input.txt
More Related Contents:
- How to get the path of a running JAR file?
- How to make an executable JAR file?
- Running JAR file on Windows
- “Invalid signature file” when attempting to run a .jar
- Execute another jar in a Java program
- What causes “Unable to access jarfile” error?
- Creating runnable JAR with Gradle
- Why is my URI not hierarchical? [duplicate]
- Execute .jar file from a Java program
- Reference jars inside a jar
- Visual Studio Code, Java Extension, how to add a JAR to classpath?
- NoClassDefFoundError while trying to run my jar with java.exe -jar…what’s wrong?
- Java command line with external .jar
- Creating Runnable Jar with external files included
- “Could not find the main class” error when running jar exported by Eclipse
- Double Clicking JAR file does not open Command Prompt
- How to use a file in a jar as javax.net.ssl.keystore?
- Run a jar File from java program
- How to copy files out of the currently running jar
- Why does my JAR file execute at CMD, but not on double-click?
- How to load JAR files dynamically at Runtime?
- How to list the files inside a JAR file?
- Run jar file in command prompt [duplicate]
- How to convert AAR to JAR
- Extract and load DLL from JAR
- How to get names of classes inside a jar file?
- How can my Java program store files inside of its .jar file?
- Classpath resource within jar
- Read directory inside JAR with InputStreamReader
- Difference between the maven-assembly-plugin, maven-jar-plugin and maven-shade-plugin?