Skip to content

Failed generating Java to Swift due to missing config file #213

Open
@julian-baumann

Description

@julian-baumann

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions