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

Error: main method not found in class ammonite.Main #130

Open
guizmaii opened this issue Dec 2, 2021 · 2 comments
Open

Error: main method not found in class ammonite.Main #130

guizmaii opened this issue Dec 2, 2021 · 2 comments

Comments

@guizmaii
Copy link

guizmaii commented Dec 2, 2021

I'm using the launcher in my CI to run some scripts (very useful, thanks!):

./coursier launch io.github.alexarchambault.ammonite::ammonite-runner-cli:latest.release -- .github/scripts/helloWorld.sc

And since yesterday they started to fail to execute with a Error: main method not found in class ammonite.Main error.

Could it be related to this change: com-lihaoyi/Ammonite#1229? Or maybe this coursier/apps#125? 🤔

@guizmaii
Copy link
Author

guizmaii commented Dec 2, 2021

FYI, I fixed my issue by replacing

./coursier launch io.github.alexarchambault.ammonite::ammonite-runner-cli:latest.release -- .github/scripts/helloWorld.sc

with

./coursier launch ammonite -- .github/scripts/helloWorld.sc

@guizmaii guizmaii closed this as completed Dec 2, 2021
@guizmaii
Copy link
Author

guizmaii commented Jan 5, 2022

It fails again even with the change explained previously here #130 (comment) 🙁

The error is now:

Error: Main method not found in class ammonite.Main, please define the main method as:
   public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

Edit
Here the fix.
Replace:

./coursier launch ammonite -- .github/scripts/helloWorld.sc

with:

./coursier launch ammonite:2.4.1 -- .github/scripts/helloWorld.sc

@guizmaii guizmaii reopened this Jan 5, 2022
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