Submitted On 06-SEP-2001
tpistor
I use classes that are in an unnamed namespace that were
written by somebody else (i.e. I don't have the source
code). I can't move them from the unnamed namespace into a
named namespace (can I? How? Decompile, add a "package"
statement and recompile?)
Submitted On 06-SEP-2001
tpistor
The how does a class in a named namespace access a class in
an unnamed namespace?
Submitted On 13-DEC-2001
Martin3
idl declarations not enclosed in any modules map into the
(Unnamed ) Java global scope which has no visible package.
Ref. ftp.omg.org/pub/docs/ptc/00-01-08.pdf. For example:
//IDL
module Example{...}
//generated Java
import Example;
...
which occurs for many idl files. It would be beneficial if
idlj had the option to define a prefix for the idl
declarations not enclosed inside modules.
Submitted On 14-FEB-2002
warndtrunner
Very nice "feature".
Now we have to change a lot of our production code.
And don't tell me that's not in the spec.
A lot of books, samples (even a few from SUN) use that
feature.
Well, I hope that this will be that last thing we need
change because of 1.4.
Submitted On 21-FEB-2002
jonmeyer
I understand the need for a cleanly specified language, but
this decision is crazy. Sun did us all a favor when they
introduced the @deprecated mechanism to support backwards
compatability and also move the language forward. Why did
they abandon this philosophy when it came to refining the
language spec?
I was trying out someone else's device driver in my
application. But they had placed the code in the unnamed
namespace. Took me half a day to find the problem, rewrite
the JNI code, and compile the thing. They were using 1.3
and didnt know there was a problem.
Please: do the developer community a favor and opt for
compatability over zealotry.
Submitted On 11-MAR-2002
vortex1111vortex
What a horrible decision! How am I supposed to import other
packages that I only have class files for, like LVG?
And also, the compiler dosen't even give you a good message
about it! If your going to make a stupid change to compiler
behavior like this, you could at least have had a message
from the compiler saying that this has changed. It takes a
long time to track down bugs like this.
Submitted On 18-JUN-2002
draes
Another workaround is using jikes for compilation. So far
this one does not complain about this.
Submitted On 19-JUN-2002
jackleung
What a "feature"!
Will the coming 1.4+ versions support this backward
compatability again? Otherwise we have to fall back to 1.3.
Submitted On 05-SEP-2002
SteadmanJ
You might want to change the following text from
http://java.sun.com/docs/books/tutorial/java/interpack/usepk
gs.html
For your convenience, the Java runtime system automatically
imports three entire packages:
The default package (the package with no name)
The java.langpackage
The current package
Submitted On 13-OCT-2002
mcpierce
Shouldn't the language disallow placing classes in the
unnamed package since they become invisible to classes in
named packages?
Submitted On 22-OCT-2002
toriver
If the JLS has been "updated" to say that you cannot import a name in an unnamed package, you may want to put it online; There is nothing (in §7.5 and §6.7) that indicates default package imports are not legal in the version on http://java.sun.com/docs/books/jls/second_edition/html/
Submitted On 23-JAN-2003
dbreese
This sucks.
Submitted On 14-FEB-2003
FranckC
I agree. :)
Submitted On 25-MAR-2003
alxstar
Also, the examples included in downloadable "Java Web
Services Tutorial v1.1"
(http://java.sun.com/webservices/downloads/webservicestuto
rial.html) need to be fixed.
The sample DATE application:
1) MyDate.java & MyLocales.java - both classes are not
packaged.
2) index.jsp:
<%@ page import="MyLocales" %>
3) date.jsp:
<%@ page import="MyDate,MyLocales" %>
<%@ page import="MyDate,MyLocales"> is translated to:
. . .
import MyDate;
import MyLocales;
. . .
which generates error in JDK 1.4.x.
Submitted On 25-MAR-2003
alxstar
Would you fix Sun's "The Java Web Services Tutorial"
(http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPIn
tro2.html#65749):
-------------------------------------------------
The jsp:include element sends a request to another page
(date.jsp) and includes the response in the response from the
calling page.
<%@ page import="java.util.*,MyLocales" %>
-----------------------------------------------
This definitely won't work with MyLocales in unnamed
namespace.
Submitted On 17-NOV-2003
maddan
the 'new' gCPortal no longer compiles because of this. I don't
know what makes you more stupid, publishing code from your
website that uses unnamed namespaces or breaking the
compiler. I guess both, well done Sun!
Submitted On 20-NOV-2003
alvarov66
Please, just fix this compiler bug and stop trying to
explain the unexplainable.
Submitted On 08-DEC-2003
Francis.ANDRE
Hi
This is a regression from inter language (i.e. not only
Java) communication point of view...I have a compiler
of a language let say LANG that generates bytecode
classes without package, i.e in the default package
name space.
Now, with this fix, I can't anymore integrate Java class
that are using LANG classes....In particular, I cannot
run JUnit testing anymore!!!
Submitted On 19-MAR-2004
cogitoboy
I am offended at the justification for this compiler
change. There are a great number of production classes
defined in the default namespace (nevermind it is a bad
idea to do so- and Sun has been warning people not to)! I
don't understand how this change provides a benifit
greater than the real pain it causes.
Submitted On 26-MAY-2004
Pareekshit
Any work arounds to this possible, i mn if we still want to import unnamed namespaces???
Pary
Submitted On 24-JUN-2004
J.Fulton
Backwards compatible?
Submitted On 07-JAN-2005
asjf
hm, i think this is good thing on balance
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|