Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2004, 12:52 PM
Authorized User
 
Join Date: Jun 2003
Location: Livermore, CA, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compiling Related java files

If I have to classes that reference each other, how would I get them both to compile?
I have ProgramA.java that belongs to package com.neopost.projectA and has a Protected Object reference to com.neopost.projectA.ProgramB.

Inside ProgramB.java that belongs to package com.neopost.projectA, there is a Private Object reference to com.neopost.projectA.ProgramA.

When I try to compile ProgramA.java I get "ProgramB.class not found" or "Symbol not recognized" errors, because ProgramB.class does not exist yet. So I try to compile ProgramB.java, and I get "ProgramA.class not found" or the same Symbol not recognized error.

How do I get these programs compiled?
Reply With Quote
  #2 (permalink)  
Old August 4th, 2004, 03:45 AM
Registered User
 
Join Date: Aug 2004
Location: Chennai, TN, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If both the classes are in the same package.

go to <dir>/com/neopost/projectA> and give javac *.java

Quote:
quote:Originally posted by Jstmehr4u3
 If I have to classes that reference each other, how would I get them both to compile?
I have ProgramA.java that belongs to package com.neopost.projectA and has a Protected Object reference to com.neopost.projectA.ProgramB.

Inside ProgramB.java that belongs to package com.neopost.projectA, there is a Private Object reference to com.neopost.projectA.ProgramA.

When I try to compile ProgramA.java I get "ProgramB.class not found" or "Symbol not recognized" errors, because ProgramB.class does not exist yet. So I try to compile ProgramB.java, and I get "ProgramA.class not found" or the same Symbol not recognized error.

How do I get these programs compiled?

Reply With Quote
  #3 (permalink)  
Old August 9th, 2004, 07:18 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

If it is across the package folders

use the import statement import com.neopost.projectA.*; // in projectB folder vice versa



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling JAVA code in .NET? sivavenugopal BOOK: Beginning ASP.NET 1.0 1 January 24th, 2007 01:52 AM
help with compiling include files mastrgamr C++ Programming 3 December 14th, 2006 07:58 AM
Problem with the speed of compiling java programs sharadagarwal BOOK: Beginning Java 2 4 February 21st, 2004 02:40 PM
ch 12 compiling com\wrox\secure\*.java classes JHvdSloot JSP Basics 3 September 23rd, 2003 07:42 AM
New to Java, problems compiling Kyle Colyer JSP Basics 3 September 6th, 2003 04:58 AM



All times are GMT -4. The time now is 07:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.