Any way to compile a java program with missing sources?

Discussion in 'Java' started by kahrayzee@gmail.com, Mar 28, 2007.

  1. Guest

    Hi,

    I am stuck maintaining an old product that is missing a large set of
    the original source files. I need to make a tiny modification to a
    section of code that I actually do have the accurate source for,
    however I am unable to compile it without the entire classpath and all
    setup. Is there perhaps some way to either trick javac into only
    compiling this one file without rebuilding everything else with a
    parameter to tell it not to do this?

    I am getting a lot of "Cannot resolve symbol" errors. What I would
    ultimately like to be able to do is to re-compile this one class and
    then put it into the correct location in the .jar file and see if it
    behaves properly. If anyone has any suggestions it would be greatly
    appreciated.

    Thanks,

    Greg
    , Mar 28, 2007
    #1
    1. Advertising

  2. On Mar 29, 1:04 am, wrote:
    ...
    > I am stuck maintaining an old product that is missing a large set of
    > the original source files. I need to make a tiny modification to a
    > section of code that I actually do have the accurate source for,


    You can compile the source, using the existing
    *classes* for reference. Simply ensure they are
    on the classpath at time of compilation.

    Andrew T.
    Andrew Thompson, Mar 28, 2007
    #2
    1. Advertising

  3. Hi,

    wrote:
    > I am stuck maintaining an old product that is missing a large set of
    > the original source files. I need to make a tiny modification to a
    > section of code that I actually do have the accurate source for,
    > however I am unable to compile it without the entire classpath and all
    > setup. Is there perhaps some way to either trick javac into only
    > compiling this one file without rebuilding everything else with a
    > parameter to tell it not to do this?
    >
    > I am getting a lot of "Cannot resolve symbol" errors. What I would
    > ultimately like to be able to do is to re-compile this one class and
    > then put it into the correct location in the .jar file and see if it
    > behaves properly. If anyone has any suggestions it would be greatly
    > appreciated.


    Every Java programmer does this every day! (Or do you think, that
    compiling a "Hello world"-Programm will re-compile the whole Java-API?)

    The "trick" ist to setup the classpath correctly while compiling, that
    means to let it point to your JAR file.

    Hth,
    Ingo
    Ingo R. Homann, Mar 28, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alfonso Melchionna

    how compile sources VB.NET & C# with command line?

    Alfonso Melchionna, Nov 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,863
    John Azzolina
    Dec 3, 2004
  2. Stefan Siegl
    Replies:
    14
    Views:
    1,751
    Will Hartung
    Sep 8, 2004
  3. Nagaraj
    Replies:
    1
    Views:
    852
    Lionel B
    Mar 1, 2007
  4. PerlFAQ Server
    Replies:
    0
    Views:
    123
    PerlFAQ Server
    Feb 3, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    117
    PerlFAQ Server
    Feb 22, 2011
Loading...

Share This Page