Heroku Java application runs locally with a wizard

I follow the Getting Started with Java on Heroku guide at https://devcenter.heroku.com/articles/getting-started-with-java I follow the steps until I deploy and run the application downloaded from GitHub . When I try to execute it locally in Windows XP using the command

foreman start web 

I get an error message:

  web.1 | started with pid 3388 web.1 | Error: Could not find or load main class Main web.1 | exited with code 1 system | sending SIGKILL to all processes 

My Procfile:

 web: java %JAVA_OPTS% -cp target\classes:target\dependency\* Main 

and

 >echo %JAVA_OPTS% -Xms256m -Xmx512m 

Can someone suggest me how to solve?

+5
source share
3 answers

Quotes and semicolon

 web: java %JAVA_OPTS% -cp target\classes;"target\dependency\*" Main 
+7
source

I ran into this problem when running the https://devcenter.heroku.com/articles/getting-started-with-java tutorial.

After completing some of these answers, I found that step 6 in https://devcenter.heroku.com/articles/getting-started-with-java#define-a-procfile reports the answer.

When you see instructions for starting your application with a wizard, add the optional -f flag to Procfile.windows to make sure your Windows Procfile is selected. For example: web -f startup wizard Procfile.windows

As soon as I switched to the start command of the -f Procfile.windows wizard, everything worked smoothly.

+3
source

Same issue with java-get-stared application downloaded from heroku server. Go to ";" works on windows. Still need a ":" on the Linux hero server.

+1
source

Source: https://habr.com/ru/post/1203615/


All Articles