• 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:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

A colleague's question about a large project

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yesterday, somone I work with asked me a question that stumped me. I had an answer for her but it didn't answer her actual question... You see, she is working with a rather large Java Dynamic Web Project in Eclipse and building the entire project apparently takes a lot of time. So she informs me that she has all of the application code in a JAR file (this is the jar that will get released in the final package) and wants to make a change to one of the classes in the jar file. So what she does is just get the source for that one class and put it in her project. I come into the loop when she calls me and asks "Why is there no class file after making the change to the source?" (She has build automatically turned on for the project)

I told her that this was probably not the best way to set up her project. I told her that she would probably want to get all of the source for the application and put it into her project if she was going to be making changes to code that will be eventually released in the jar file. I am thinking that doing this will take care of her problem with the class that is not getting built. But, I still wonder, do people actually do what she was trying to do? Is this acceptable? Is this probably the reason why Eclipse was not automatically building the class after she made her change or does she have something else dorked up in her environment?
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have run into build issues with large projects before using Eclipse/NetBeans/BlueJ whatever... To get around this, I generally try to section out processes into different projects or packages, then turn off auto-build (in Eclipse world) and compile each as needed. I find this an easier way of developing because then I can just reference to the projects or built libraries in dependent projects.

Sometimes splitting classes into packages or other projects isn't feasible when given code... this is when Java's command line utilities "javac" and "jar" are so extremely useful. Using the -d option with "javac" to place the compiled classes into another directory and then using the "jar" command to jar those classes makes refactoring complex pre-architectured projects simpler. All that is needed then to move class files is to drag and drop from within the directory structure or TextPad/NotePad/VIM to copy and paste code.

Hope that helps
 
Mark Williams
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the insight and tips. She better know how to compile with the javac command so I will suggest that. If she doesn't, I'll !
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic