Possibly 🙂
# On Unix
java -cp utilities.jar:. mypackage.MyClass
# On Windows
java -cp utilities.jar;. mypackage.MyClass
Basically that’s just including .
(the current directory) on the classpath as well as the jar file.
More Related Contents:
- How do I resolve ClassNotFoundException?
- What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException?
- What is a classpath and how do I set it?
- Get a list of resources from classpath directory
- Find where java class is loaded from
- Java, Classpath, Classloading => Multiple Versions of the same jar/project
- Call “java -jar MyFile.jar” with additional classpath option
- Adding files to java classpath at runtime [duplicate]
- Eclipse: How to build an executable jar with external jar?
- java.lang.ClassNotFoundException in spite of using CLASSPATH environment variable
- How to add directory to classpath in an application run profile in IntelliJ IDEA?
- Classpath does not work under linux
- How to load/reference a file as a File instance from the classpath
- Intellij Cannot resolve symbol on import
- Scanning classpath/modulepath in runtime in Java 9
- Execute jar file with multiple classpath libraries from command prompt
- include external jar when running java -jar
- IntelliJ IDEA: “cannot resolve symbol” for String, System and other Java classes
- Including jar files in class path
- How can I save a file to the class path [closed]
- Java: NullPointerException from class.getResource( … )
- Adding external resources to class-path in Tomcat 8
- Getting Ant to recognise a classpath
- How to read text file from classpath in Java?
- Where is the correct location to put Log4j.properties in an Eclipse project?
- Adding to the classpath on OSX
- What’s the difference between a System property and environment variable
- Java – setting classpath
- TestNG ERROR Cannot find class in classpath
- What exactly is a class path in java?