• 16 September

    Convert String to Path in Java

    In this post, we will see how to convert String to Path in Java. Using Paths’get() method [ Java 7 ] To convert String to Path, use jva.nio.file.Paths's get() method. It is a static method. Here is an example: [crayon-6729bf32daa25550533763/] Output: [crayon-6729bf32daa2e654617355/] You can also join multiple strings using Paths‘s get() method. It will join […]

  • 15 September

    How to Get Temp Directory Path in Java

    In this post, we will see how to get temp directory path in java. Get Temp Directory Path in Java Using System.getProperty() To get the temp directory path, you can simply use System.getProperty("java.io.tmpdir"). It will return default temporary folder based on your operating system. Default temp directory path Windows : %USER%\AppData\Local\Temp Linux/Unix: /tmp Let’s see […]

  • Print CLASSPATH in java
    08 February

    Print Classpath in Java

    In this post, we will see how to print CLASSPATH in java. 💡 Outline You can use System.getProperty("java.class.path") to get ClassPath in java. [crayon-6729bf32dc1d0612682891/] What is CLASSPATH in java CLASSPATH variables tell application to location where it should find user classes. Default CLASSPATH is current working directory(.). You can override this value using CLASSPATH variables […]

  • 07 December

    How to set java path in windows 10

    In this post, we will see about how to set java path in windows 10 using cmd. To set java path, you need to first understand about JAVA_HOME and how to set JAVA_HOME in windows 10. Let’s first understand about JAVA_HOME and then we will see how to set JAVA_HOME in windows 10. What is […]

  • 22 May

    Difference between PATH and CLASSPATH in java

    In this post , we will see differences between PATH and CLASSPATH in java. Let me provide simple definition about PATH and CLASSPATH. PATH : This is environment variable which operating system uses to locate executable such as javac, java, javah,jar etc. For example: bin directory of jdk has all the executable such as javac,java […]