swiftlang / swiftlang/swift-java

Failed generating Java to Swift due to missing config file

Open
#213 1 comment 0 reactions 1 assignee View on GitHub

@ktoso is already working on this.

Since Jun 9, 2025.

feature:wrap-java
Dominant language
Swift
Stars
1.2k
Forks
123
Avg merge
1d 7h
Merged PRs (30d)
16

Description

When I try to run the following command:

swift run Java2Swift --module-name Test --jar test.jar

I receive the following output:

error: ConfigurationError(message: "Failed to parse SwiftJava configuration at \'file:///....../Sources/Test/swift-java.config\'!", error: Error Domain=NSCocoaErrorDomain Code=260 "The file “swift-java.config” couldn’t be opened because there is no such file." UserInfo={NSFilePath=...Sources/Test/swift-java.config, NSURL=file:///..../Sources/Test/swift-java.config, NSUnderlyingError=0x600000264420 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}, file: "Java2SwiftPlugin/Java2SwiftPlugin.swift", line: 41)
error: build stopped due to build-tool plugin failures

The error suggests that the configuration file is missing. However, according to the documentation here this tool should generate the configuration file automatically.

Am I missing something? Do I need to create this configuration file manually, or should the tool generate it for me?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.