Langsung ke konten utama

Postingan

Menampilkan postingan dari Januari, 2018

PENTAHO Set JAVA environment variables

The JAVA_HOME and JRE_HOME environment variables The BI Server is written on the Java platform, and for the BI Server to work properly, you need to make sure that the JAVA_HOME or JRE_HOME environment variable has been set up properly. Follow the given steps: Set the JAVA_HOME variable pointing to your JDK installation folder, for example, C:\Program Files\Java\jdk1.6.0_45 . Set the JRE_HOME variable pointing to your JRE installation folder, for example, C:\Program Files\Java\jre6 . For example, if you set the JAVA_HOME variable in the Windows 7 environment, the Environment Variables dialog will look like the following screenshot:

Resolve absolute path from relative path and/or file name

In batch files, as in standard C programs, argument 0 contains the path to the currently executing script. You can use %~dp0 to get only the path portion of the 0th argument (which is the current script) - this path is always a fully qualified path. You can also get the fully qualified path of your first argument by using %~f1 , but this gives a path according to the current working directory, which is obviously not what you want. Personally, I often use the %~dp0%~1 idiom in my batch file, which interpret the first argument relative to the path of the executing batch. It does have a shortcoming though: it miserably fails if the first argument is fully-qualified. If you need to support both relative and absolute paths, you can make use of Frédéric Ménez's solution : temporarily change the current working directory. Here's an example that'll demonstrate each of these techniques: @echo off echo %%~dp0 is "%~dp0" echo %%0 is "%0" ec...