swiftlang / swiftlang/swift-java
Failed generating Java to Swift due to missing config file
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.