Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Any way to compile a java program with missing sources?

Thread view: 
kahrayzee@gmail.com - 28 Mar 2007 16:04 GMT
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
Andrew Thompson - 28 Mar 2007 16:09 GMT
On Mar 29, 1:04 am, kahray...@gmail.com 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.
Ingo R. Homann - 28 Mar 2007 16:12 GMT
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
[quoted text clipped - 9 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.