classpath puzzle

R

Roedy Green

import sun.util.logging.PlatformLogger;

will compile fine inside the IntelliJ IDE but fails with symbol not
found with javac *.java or with ANT

The class files lives inside rt.jar. Javac is supposed to find such
files without help. Any ideas on what is going on?

--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 
M

markspace

import sun.util.logging.PlatformLogger;

will compile fine inside the IntelliJ IDE but fails with symbol not
found with javac *.java or with ANT

The class files lives inside rt.jar. Javac is supposed to find such
files without help. Any ideas on what is going on?


Didn't we help you with this already? Didn't we discover that javac
compiles against a shortened "stub" list of classnames, and doesn't use
the rull rt.jar during compilation? Didn't we find a command line
switch for that told javac to not do that?
 
R

Roedy Green

Didn't we help you with this already? Didn't we discover that javac
compiles against a shortened "stub" list of classnames, and doesn't use
the rull rt.jar during compilation? Didn't we find a command line
switch for that told javac to not do that?

Maybe somebody did, but nothing you said sounds familiar. I can see
that behaviour as an optimisation, but I would think it should look in
the real rt.jar if it can't find it. Perhaps the logger class is
considered Sun private.

I'll see if I can find that option. Thanks.

--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 
J

Jukka Lahtinen

Roedy Green said:
import sun.util.logging.PlatformLogger;
will compile fine inside the IntelliJ IDE but fails with symbol not
found with javac *.java or with ANT
The class files lives inside rt.jar. Javac is supposed to find such
files without help. Any ideas on what is going on?

Aren't those sun.* classes in rt.jar ones meant for ONLY internal use by
other classes of the sdk library, NOT for application programmers?
 
R

Roedy Green

Aren't those sun.* classes in rt.jar ones meant for ONLY internal use by
other classes of the sdk library, NOT for application programmers?

Yes but there are certain things you can only do by using them, like
turning of the logging of a zillion malformed cookie errors
from kobo.com

Sun has the right to change the API, delete methods etc without
notice. With other methods in the API they deprecate. Sun does not
feel obligated to document its internal methods to the same extent it
does the normal API.

They are making it a bit difficult to use the methods to ensure people
don't use them without good reason. For example they want you to use
your own Base64 rather than use the built in one. I guess they did
not have the budget to bring their Base64 up to exposure standards.

--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 
R

Roedy Green

It works. The erroneous cookies are now being ignored.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Controlling complexity is the essence of computer programming.
~ Brian W. Kernighan 1942-01-01
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

JDK 1.7.0_05 is out 1
font variants 1
rt.jar classlpath confusion 0
case strings 8
Playful puzzle 2
ant and -bootclasspath 5
Ant 1.8.4 releeased 1
New ant version 2

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top