Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I deploy my jar file on heroku?

Tags:

heroku

My version of Heroku is as follows:

heroku/7.0.60 darwin-x64 node-v10.2.1

When I run:

heroku deploy:jar ...

I get:

 ›   Error: deploy:jar is not a heroku command.
 ›   Perhaps you meant destroy
 ›   Run heroku help for a list of available commands.

This seems to contradict the docs:

https://devcenter.heroku.com/articles/deploying-executable-jar-files

What am I doing wrong?

like image 766
Hoa Avatar asked May 28 '18 07:05

Hoa


People also ask

Why can't I run a .JAR file?

If you can't run jar files on your Windows 10 PC, you might need to reinstall Java Runtime Environment. When JAR files are not opening, another great method is to simply use a universal file opener. Alternatively, some reported that turning your JAR file into a BAT file worked perfectly.

Can JAR file be deployed?

You can make your simple archive or J2EE Client Module into an executable JAR file that you can launch with the java command. To deploy an executable JAR file: Select and right-click the simple archive or client icon in the Navigator to display the context menu.


2 Answers

I had the same Error, but the docs helped out. Before you can run the deploy command you have to install the java plugin: heroku plugins:install java

like image 188
Chris Avatar answered Oct 03 '22 04:10

Chris


It means that you have not installed deploy plugin. So first install the heroku deploy plugin using below command:

heroku plugins:install heroku-cli-deploy

And then try to deploy the jar. It should work

like image 41
Vaibhav Sharma Avatar answered Oct 03 '22 02:10

Vaibhav Sharma