Re: Help with multiple file projects
From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 11/29/03
- Next message: sayoyo: "LDAP JNDI how can I read a LDAP schema"
- Previous message: Pierre Morel: "Where is the i18n.jar file?"
- In reply to: Herman: "Re: Help with multiple file projects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Nov 2003 21:40:04 -0800
herman404@hotmail.com (Herman) wrote in message news:<d647544a.0311281041.2eafb59d@posting.google.com>...
> "Dan Nuttle" <d_nuttle@hotmail.com> wrote in message news:<x39wb.16768$Rk5.2688@newsread1.news.atl.earthlink.net>...
> > I can't see any immediate cause for the compile error. Both classes are in
> > the same package, so you actually don't need to import Point in Polygon, but
> > doing so doesn't hurt anything. I pulled your code into Eclipse, using JDK
> > 1.3.1, commented out things like references to objects in your drawing
> > package, and the code compiled for me.
> >
> > So there's something else at work that you're not showing; unless there's
> > some big difference between 1.3.1 and 1.4.0 that I don't know about; I
> > don't think that's the case.
>
> I compiled it in the BlueJ IDE and it worked fine. Someone mentioned
> that in order to compile using packages with the Sun SDK, you needed a
> makefile or something like that. Anyone know how to compile multiple
> .java files into a package using the Sun SDK?
If your class A that belongs to package P does refer to class B that
also belongs to package P, then, when you compile A.java in the
current directory P,
javac -classpath .. A.java
If you compile A.java in the current directory ../P, which is the root
directory of package P,
javac -classpath . A.java
In order to learn classpath setting for Java package, read the J2SE
basic documents for javac compiler.
- Next message: sayoyo: "LDAP JNDI how can I read a LDAP schema"
- Previous message: Pierre Morel: "Where is the i18n.jar file?"
- In reply to: Herman: "Re: Help with multiple file projects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|