About 1,880,000 results
Open links in new tab
  1. java - What is a classpath and how do I set it? - Stack Overflow

    Mar 7, 2010 · 549 I was just reading this line: The first thing the format () method does is load a Velocity template from the classpath named output.vm Please explain what was meant by …

  2. What exactly is a classpath in Java? - Stack Overflow

    Nov 11, 2025 · CLASSPATH is an environment variable that helps us to educate the Java Virtual Machine from where it will start searching for .class files. We should store the root of the …

  3. Including all the jars in a directory within the Java classpath

    We get around this problem by deploying a main jar file myapp.jar which contains a manifest (Manifest.mf) file specifying a classpath with the other required jars, which are then deployed …

  4. How to set the environment variables for Java in Windows

    In programming context you can execute SET command (SET classpath=c:\java) or Right click on your computer > properties > advanced > environment variables. In a batch file you can use

  5. java - Run a JAR file from the command line and specify classpath ...

    When you specify -jar then the -cp parameter will be ignored. From the documentation: When you use this option, the JAR file is the source of all user classes, and other user class path settings …

  6. java - How do I resolve ClassNotFoundException? - Stack Overflow

    Sep 9, 2016 · 49 Your classpath is broken (which is a very common problem in the Java world). Depending on how you start your application, you need to revise the argument to -cp, your …

  7. Call "java -jar MyFile.jar" with additional classpath option

    Apr 10, 2013 · The only way to set the classpath is using manifest file in the jar. It is easier to just use the -cp option, add your jar file to that, then explicitly call the main class.

  8. How to run a java class with a jar in the classpath?

    java -cp .:utilities.jar mypackage.MyClass The current directory is not in the CLASSPATH by default when you specify a value for -cp.

  9. URL to load resources from the classpath in Java

    19 From Java 9+ and up, you can define a new URLStreamHandlerProvider. The URL class uses the service loader framework to load it at run time. Create a provider:

  10. java - ¿ Cómo funciona CLASSPATH? - Stack Overflow en español

    Each classpath should end with a filename or directory depending on what you are setting the class path to: For a .jar or .zip file that contains .class files, the class path ends with the name …