Skip to main content

Disabling "Loaded image" from the Java Console

11 replies [Last post]
jacobdk
Offline
Joined: 2008-04-21

Hi forum

From 6u10 and upwards, the Java Console outputs a line like this each time, the Java code loads an image:

"Loaded image: jar:http://testkirkeportal.brandsoft.dk/forms/java/bsweb.jar!/oracle/forms/icons/ellipsis.gif"

Forms does this a lot of times during a session, and therefore it can be difficult to debug stuff, as all these "Loaded image:" lines are cluttering the Java Console a lot. JRE version before 6u10 didn't output these messages, as far I know.

What's the point behind these debug messages, and is it in any way possible to disable them?

Could some Sun people please comment on this? You must have had some reason to introduce all this output in the console. I'd like to know if and how I can disable it... please respond.

Thanks in advance,
Jacob

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cvd
Offline
Joined: 2009-03-18

I have one more relevant observation that might prove useful.
When I specified a particular JRE to be used to run the applet (e.g. 1.5.0_14) I could observe the same redundant “Loaded image:” output.
The only difference was that the console contained these two lines at the top:

// Start of Log
Java Plug-in 1.6.0_12
Using JRE version 1.5.0_14 Java HotSpot(TM) Client VM
…
(same as before)
// End of Log

It appears that the output is generated by the plugin2 and not the JVM that’s currently running the applet. If that’s the case the “Plug-in” category is probably where this whole topic belongs.

At this point we have no way of knowing for sure.

rogyeu
Offline
Joined: 2006-07-30

Hi Jacob,

Looks like the code for trace level isn't included when the msg is print. I have opened a bug report for this issue. Bug ID: 6823962. It may take a day or 2 to show up in the external database.

Thanks,
RY

jacobdk
Offline
Joined: 2008-04-21

Hi Roger

That's great! I have some additional info on this. It seems, that this "Loaded image" should only be displayed, when the trace level is set to 1: basic. For some reason, it is also displayed when no tracing is enabled.

For an example of this, see this bug:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6392182

This bug is completely unrelated to this issue - but if you look to the bottom of the description (just above "Workaround: N/A"), there is an example of some similar output:

basic: Loaded image: http://java.com/en/img/download/t1.gif
basic: Loaded image: http://java.com/en/img/download/t2.gif
basic: Loaded image: http://java.com/en/img/download/t3.gif
basic: Loaded image: http://java.com/en/img/download/t4.gif
basic: Loaded image: http://java.com/en/img/download/t5.gif
basic: Loaded image: http://java.com/en/img/download/t6.gif
basic: Loaded image: http://java.com/en/img/download/t7.gif

This proves to me, that this output belongs to the trace 1: basic. Please remove it, when tracing is not enabled.

Thanks in advance,
Jacob

cvd
Offline
Joined: 2009-03-18

[b]jacobdk[/b],
The applet is indeed mine and I know for sure that the output is not generated by me.
I’ve never seen it until the next-gen plug-in in JRE 6u12.
I agree that the Java Console’s tracking level used to control such output and that’s a very likely direction to look for the culprit.

[b]demonduck[/b],
you’re correct and your example doesn’t show signs of this problem.

Here are some more details about my applet.
1) I use MediaTracker’s addImage and waitForAll to load all those images.
2) The images are packed inside the jar and accessed directly using getCodeBase()

Nick

demonduck
Offline
Joined: 2008-03-14

I should mention that the applet I gave you as a test case [b]DOES[/b] have three gif files in the jar file that are read with a getResourceAsByteStream (or something like that)

They are cursor images -- the little green, amber and red dots I use for the cursor.

I do not use Toolkit or MediaTracker. So getting a gif file from the jar file as a resource must not produce the error messages that you see.

cvd
Offline
Joined: 2009-03-18

I can confirm that the same redundant output is generated in the Java Console but only when the new plug-in (plugin2) is used. When the classic plug-in is used with JRE 6u12 the Java Console will contain only the usual output (no "Loaded image:" lines)

You can witness the same if you visit http://chesstuff.blogspot.com. Below is the content of Java Console:

// Start of Log
Java Plug-in 1.6.0_12
Using JRE version 1.6.0_12 Java HotSpot(TM) Client VM
...
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wq.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/bq.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wr.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/br.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wn.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/bn.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wb.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/bb.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wk.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/bk.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/wp.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/bp.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/replay.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/pause.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/reload.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/first.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/prev.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/next.gif
Loaded image: http:/pilafov.110mb.com/cvd/bin/images/last.gif
// End of Log

jacobdk
Offline
Joined: 2008-04-21

Thanks for providing this example. It might be better than my own.

Is it in any way possible NOT to have your Java Console cluttered with this unnecessary output when using the next-gen plugin? Somebody from Sun should be able to answer this - IMO it's a very simple question....

Without having tested myselft, I suspect this output to come from the Toolkit.getDefaultToolkit().getImage() method. Can somebody with a ready-to-run applet they made themselves confirm this?

Jacob

demonduck
Offline
Joined: 2008-03-14

I don't know if this helps but I never see those lines in a console when I load my applet.

I [b]DON'T[/b] use Toolkit.getDefaultToolkit().getImage() -- I use ImageIO to get a reader for the image type.

http://pancyl.com/SecondShadyRest.htm

jjburke
Offline
Joined: 2004-03-16

How about a step by step to reproduce your problem?

Also the web link does not work.

jacobdk
Offline
Joined: 2008-04-21

That web link is not supposed to be opened - it's just an example output from the Java Console - I think I made that clear.

Here is a complete example of the Java stack trace when loading the Forms applet:

[code]
Java Plug-in 1.6.0_12
Using JRE version 1.6.0_12 Java HotSpot(TM) Client VM
User home directory = C:\Users\jom.BRANDSOFT
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to
----------------------------------------------------

Loaded image: jar:http://testkirkeportal.brandsoft.dk/forms/java/bsweb.jar!/oracle/forms/icons/bgnd.gif
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet-version er: 10.1.2.3
Loaded image: jar:http://testkirkeportal.brandsoft.dk/forms/java/bsweb.jar!/oracle/forms/icons/ellipsis.gif
Loaded image: jar:http://testkirkeportal.brandsoft.dk/forms/java/bsweb.jar!/oracle/forms/icons/frame.gif
[/code]

All I want to know is, whether it's possible to get rid of those "Loaded image:" lines from the Java Console. These lines did not appear on JRE's earlier than 6u10. Is it possible to disable them?

Does that make my question clear?

Jacob

demonduck
Offline
Joined: 2008-03-14

Is it possible that the Load Image output lines are coming from Oracle's code?

I load images all the time into my applet and never get that kind of output.