• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Up a prject  RSS feed

 
P Moran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there,

I want to setup a new Java project, its going to be using some third party jars. What i would like to know is what is the best practice in order to achieve this.

For instance how should I structure the project ? assuming the project was called MyFolder would it be a idea to create it such as follows

MyFolder/src/
MyFolder/target/
MyFolder/jars/

Assuming I would keep the source in src, when compiled the output would be in target and keeping the jars in 'jars'. What is best way to setup the classpath to always find the Jars ? as I have had trouble with this before. Also assuming there are lots of java classes needed to be compiled, whats the best way of doing it ? with just javac ? or some better way ?
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get an IDE eg NetBeans, Eclipse, let it structure the project however it feels like, then when you have got it working export the whole lot as a .jar with the main class in the manifest file.

That's what I would do; others would do something different.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody else is having a related problem: how can you get several .jar files into the same .jar? This thread might be helpful to you, if you haven't already seen it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!