• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

(Non) executable jar  RSS feed

 
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I'm trying to build a project with maven, I did the useual: clean-install-package.
The build is successfull, but when I double click my executable jar, nothing happens.
The same thing happend to me the verry first time I did a maven build, then I didn't have a manifest that specified my mainclass, now I do...
Its must be something with the buildsetting in my pom
Anyone an idea what I'm doing wrong?
I use the same build in a different program without a prob.

The build of my pom:
 
Sheriff
Posts: 21745
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running the JAR file from the command line: java -jar <jarfile>. If there are any exceptions they will be shown there.

If you're trying to create a runnable Spring Boot JAR file, you should focus more on the Spring Boot plugin. For instance, the following will take the default JAR file, rename it, and create a bigger JAR file with all dependencies bundled inside:

For more info: https://docs.spring.io/spring-boot/docs/current/maven-plugin/repackage-mojo.html
 
Daniel Demesmaecker
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that before but got an error saying something about a sourcefile missing or something when trying to execute springboot: repackage
 
Daniel Demesmaecker
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried running from commandline, it can't find/load the mainclass...
 
Daniel Demesmaecker
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the error I got when using the SpringBoot plugin:
 
Daniel Demesmaecker
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind... I downloaded and executed JarFix and that solved my prob
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!