Skip to content

Running main methods for simple debugging or desktop-1.0.jar does not work by default #15

@tdauth

Description

@tdauth

I wanted to run several main methods which would also be helpful for debugging.

I wanted to run MdxEditor.main and got:

Caused by: java.io.FileNotFoundException: warsmash.ini (Das System kann die angegebene Datei nicht finden)

which means that the file cannot be found in German. Maybe just log a warning and create default settings.
The same for TerrainView.main.

If you need to load Warcraft III data just use the service registry to extract the installation path of Frozen Throne.
If you need help with this just look at https://stackoverflow.com/questions/62289/read-write-to-windows-registry-using-java
Java should be platform independent but on Windows you could automatically get the data with the service registry

Can you add an example warsmash.ini file to the README? I have no idea what the content should be. I found one in core.assets. You could link it in the README. It looks like you have to specify the MPQ files which can be done a lot easier using the service registry. I guess reading Reforged CASC archives is not an option yet?

When I run the DesktopLauncher.main method I get this error:

Execution failed for task ':desktop:DesktopLauncher.main()'.
> Process 'command 'C:/Users/Tamino/.jdks/corretto-1.8.0_332/bin/java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

building the project with the gradle task desktop:dist and then running the JAR does lead to no output:

java -jar desktop-1.0.jar

It was before I modified the file with 7z but after removing the duplicated file there is still no output and the program exits immediately.
Removing the duplicated file "META-INF/services/javax.imageio.spi.ImageReaderSpi"" is really annoying. Is there any way to fix this?

I think overall it should be much easier to run Warsmash which would allow more people to use/debug/improve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions