Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac problem

 
Sandeep Jindal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I have a large hierarchy of classes and packages. When I compile the main class(the class in which main method is defined), all the classes used in the main class and the corrosponding classes get complied. But my problem is that there are some classes(though a few), that are not referenced directly in any class, but are loaded dynamically. Even the class name is given in XML file. So, since no class have the direct reference of these few classes, they never gets compiled. I have to explicitly compile these file. Is there any better alternate for this that Sun provides to me?
Thanks in advance
Sandeep
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need a build tool. Most people these days seem to use Ant. A build tool will let you specify the list of classes to be built, and then let you quickly bring your project up to date.
 
Sandeep Jindal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest,
Just for sake of interest I am asking this that can I assume that I have to use a third party tool for such compilation or it is just an alternate to some javac command?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A build tool is basically something that takes a list of files and commands and executes the commands on the files to build something. So, for example, it will execute javac to build the program. Therefore yes, it's a third-party tool.
 
Sandeep Jindal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernet,
Thanks for clearing my doubts.

Sandeep
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic