Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 35df5147b9c234095e00b26cd89cad2f052c1e32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo off
rem Check JAVA_HOME and KERNEL_HOME variables
if "%JAVA_HOME%" == "" (
  echo The JAVA_HOME environment variable is not defined.
  exit /B 1
)
if "%KERNEL_HOME%" == "" (
  echo The KERNEL_HOME environment variable is not defined.
  exit /B 1
)

rem Construct the CLASSPATH list from the Kernel lib directory.
for %%G in ("%KERNEL_HOME%\lib\*.jar") do call :AppendToClasspath "%%G"
for %%G in ("%KERNEL_HOME%\lib\kernel\plugins\org.eclipse.osgi_*.jar") do call :AppendToClasspath "%%G"
rem Check if there are JAR files in the lib directory.
if "%CLASSPATH%" == "" (
  echo No JAR files found in %KERNEL_HOME%\lib
  exit /B 1
)

if "%FWCLASSPATH%" == "" (
  echo No JAR files found in %KERNEL_HOME%\lib
  exit /B 1
)

rem Remove leading semi-colon or coma if present
if "%CLASSPATH:~0,1%"==";" set CLASSPATH=%CLASSPATH:~1%
if "%FWCLASSPATH:~0,1%"=="," set FWCLASSPATH=%FWCLASSPATH:~1%
exit /B 0

:AppendToClasspath
  set CLASSPATH=%CLASSPATH%;%~1
  set FWCLASSPATH=%FWCLASSPATH%,file:///%~1
  goto :eof

Back to the top