1

this is not a duplicate of the other question as it only has Maven dependencies. I am a java novice so please don't get angry if I misuse some terms here.

I am trying to create a java program that can run on both windows and linux. This project has some maven dependencies in the pom.xml and the project also relies on one executable (if the program is on windows) or a binary if the program is on linux. Right now, I have a method that checks if the system is a windows or linux and uses the appropriate one. But right now I feel that this is not the ultimate solution. What can I do here to just get one file that the user can run and that it will "just work"?

Clone
  • 3,378
  • 11
  • 25
  • 41
  • 1
    How will the Windows and Linux executables relate to the file you are trying to distribute? Will they be included in the file you distribute or is it required that the receiver have those programs installed already? If they are installed already, then it sounds like https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven is on the right track. – ProgrammersBlock Mar 21 '21 at 18:29
  • @ProgrammersBlock, Its the first option. They need to be included in the file I distribute. – Clone Mar 22 '21 at 18:56

0 Answers0