Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch files in bin/windows/*.bat do not correctly set CLASSPATH #945

Open
brad-gorman opened this issue Aug 29, 2023 · 0 comments
Open

Batch files in bin/windows/*.bat do not correctly set CLASSPATH #945

brad-gorman opened this issue Aug 29, 2023 · 0 comments

Comments

@brad-gorman
Copy link

Hi.

I'm not sure this is exactly the right repo to log this issue against, but it's where the files I'm referring to are. Please point me in the right direction if you'd prefer it was logged elsewhere.

I'm running the downloaded confluent-7.4.1 zip from here and the Windows batch files do not set up the CLASSPATH environment correctly. Running them in a non-development tree results in
source link

    Classpath is empty. Please build the project first e.g. by running 'gradlew jarAll'`

There is no gradlew in the released tools zip. I suspect either running them in a self-compiled development tree works, or most people are not using the Windows batch files.

It looks like they refer to the Apache Kafka style directory structure with \libs\ but the Confluent packages have a slightly different structure.
source link

rem Classpath addition for release
for %%i in ("%BASE_DIR%\libs\*") do (
	call :concat "%%i"
)

The Linux shell scripts set up what they call an LSB-style path in addition to the above, but this is missing on the Windows equivalents
source link

# classpath addition for release
for file in "$base_dir"/libs/*;
do
  if should_include_file "$file"; then
    CLASSPATH="$CLASSPATH":"$file"
  fi
done

# CONFLUENT: classpath addition for releases with LSB-style layout
CLASSPATH="$CLASSPATH":"$base_dir/share/java/kafka/*"
brad-gorman added a commit to brad-gorman/kafka that referenced this issue Dec 14, 2023
Fixing Windows batch files on release versions that do not include dev files or gradlew builds.

confluentinc#945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant