• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

makefile

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hoping beyond hope that someone can answer this without making me feel stupid.

I would like to create a makefile that incorporates .jar files as well as compiling several class files into one executable.

There's some data that the program references as well, so if someone could explain how that works, I'd really appreciate it, which is to say I need to know if the data gets rolled into the executable, or if the data is just necessarily in teh same folder as the .exe.

I've looked around the web more than once, and I found a couple of pretty convoluted answers, but nothing definitive.

To quote lilu: please halp
 
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it have to be a makefile?  I'm assuming you're on a Unix-like system.   Other options are Maven, Ant, and most IDEs have some sort of way to create executable jars.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

In the Java world, people don't usually use the 'make' tool to build projects. There are other build tools which are specifically made for Java; Knute already mentioned Maven and Ant, and there's also Gradle. These are more or less the standard build tools that are used for Java.

If you want to learn a Java build tool, then Maven is a good one to start with. Ant is a bit older and Gradle is maybe a bit more complicated to get started with.
 
Sheriff
Posts: 67759
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll offer a different opinion: Maven is hopelessly complicated, Gradle is even more hopelessly complicated, Ant is a better choice to start out with. My 2¢

I will agree that make in the Java environment is just not done.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic