🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #296

Re: Bizarre import weirdness

#296
From: Ron Albright
Date: Tue, 04 Dec 2001 20:19
55 lines
3333 bytes
On Tue, 4 Dec 2001 18:12:08 -0000, Jon Skeet
<skeet@pobox.com> wrote:

>Ron Albright <moron(at)pobox.com> <Ron Albright <moron(at)pobox.com>> 
>wrote:
>> I just switched to JBuilder 6 Ent from JBuilder 5. Same
>> project using Sun JDK 1.3.1-b24 in both cases to build. On
>> JBuilder 6 the following class only builds if the explicit
>> import of base class
>> com.greenbird.persistence.PersistentRdbmsObject is
>> uncommented. com.greenbird.persistence is a required
>> library. What's even weirder is that there are several other
>> classes from the com.greenbird.persistence lib being
>> referenced in the class definition. Why is an explicit
>> import of the base class required?
>
>Because otherwise the compiler has no idea what you mean by 
>"PersistentRdbmsObject". There could be any number of classes with that 
>name in various packages.

So you're implying the 'import <package>.*' statement does
nothing? If you have the following 2 imports the compiler
gives an ambiguous reference error if a 'Date' object is
declared without specifying the package.

import java.sql.*;
import java.util.*;

>
>> Why would JBuilder have anything to do with this when the build 
>> is being done using a Sun JDK?
>
>I don't see why it should ever have built in anything else, frankly.
> 
>> package com.greenbird.persistence.test;
>> 
>> import java.sql.*;
>> import java.lang.reflect.Field;
>> 
>> // Builds only if the following line is uncommented
>> //import com.greenbird.persistence.PersistentRdbmsObject;
>> 
>> import com.greenbird.persistence.*;
>> 
>> public class Jdbc_Test extends PersistentRdbmsObject
>> {
>> ....< Class definition includes references to
>> com.greenbird.persistence.PersistenceException >....
>> }


Ron Albright
greenbird(at)KILLSPAM.pobox.com
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
Technical Details
Message-ID: <2fbq0uc3fvvu49ro53j1pq2mip7nff83bg@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!corp-goliath.newsgroups.com
References: <612q0uggd5qbghbdj3dm16vet63el85a34@4ax.com> <MPG.1677224fb3f43e5198a676@mrmog.peramon.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa3e3,b03b9f2c50f270a6
X-Google-Attributes: gidfa3e3,public
X-Google-Thread: 10a146,b03b9f2c50f270a6
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2001-12-04 12:20:01 PST
From: Ron Albright <moron(at)pobox.com>
Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.ide
Subject: Re: Bizarre import weirdness
Date: Tue, 04 Dec 2001 14:19:28 -0600
Reply-To: moron(at)pobox.com
Message-ID: <2fbq0uc3fvvu49ro53j1pq2mip7nff83bg@4ax.com>
References: <612q0uggd5qbghbdj3dm16vet63el85a34@4ax.com> <MPG.1677224fb3f43e5198a676@mrmog.peramon.com>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 127.0.0.1
Lines: 55
X-Authenticated-User: 2119790
X-Comments: This message was posted through Binaries.net
X-Comments2: IMPORTANT: Binaries.net does not condone, nor support,  spam or any illegal or copyrighted postings.
X-Report: Please report abuse to <abuse@Binaries.net>
Organization: Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!corp-goliath.newsgroups.com