A bit confused with SoftReference - when exactly is it collected?

M

Mark Jeffcoat

Twisted said:
I have downloaded full JDKs. (1.5.0_06 and 1.6.0, both currently
installed).

[from another bit of this thread]
Error: no `server' JVM at
`C:\PROGRA~1\Java\jre1.6.0\bin\server\jvm.dll'.
Same with the 1.5.0_06 JVM, in case anyone's wondering.


You may have downloaded it, but you're still running Java
from the JRE, not the JDK. Check your path.
 
T

Twisted

Hrm -- that works. But it seems like a strange decision to make -- as
if they thought that server software is going to be perpetually in
development and never used except by java developers or something. :)

Any notion on the 64-bit optimizations under 32-bit Windows? I repeat
that I didn't see any binaries (for 1.5.0_0x or 1.6.0) on Sun's site
that were 64-bit anything that didn't seem to be for 64-bit Windows...
 
J

Juha Laiho

Twisted said:
And you get these special binaries where, and install them how (if not
self-explanatory once you have them)? (The installer didn't do it
automatically, and the download links on Sun's site include links for
64-bit binaries for 64-bit Windows, but not 64-bit binaries for 32-bit
windows. Although I have e.g. 64-bit binaries for Quake IV and the like
here...)

Go to
http://java.sun.com/javase/downloads/index.jsp
and choose the ">>Download" link beside "JDK 1.5.0 Update 9".

Look through the list; Windows x64 things are at the bottom of the list.
Installation instructions are at http://java.sun.com/j2se/1.5.0/install.html .
 
O

Oliver Wong

Twisted said:
Hrm -- that works. But it seems like a strange decision to make -- as
if they thought that server software is going to be perpetually in
development and never used except by java developers or something. :)

I think it's more along the lines of "People are making fun of Java
'cause you have to download a huge 300MB runtime just to run a 200KB applet.
What can we get rid of from the end-user's stuff to make it as small as
possible?"

- Oliver
 
T

Twisted

Oliver said:
I think it's more along the lines of "People are making fun of Java
'cause you have to download a huge 300MB runtime just to run a 200KB applet.
What can we get rid of from the end-user's stuff to make it as small as
possible?"

I don't think the server VM is much bigger than the client VM. It's the
JDK that's much bigger than the JRE, but that's becaus

WHOA. SEVERE bug in Firefox just now! I was typing away (above) when a
download (that x64 file hidden at the bottom of the 1.6.0 page -- for
some reason it's at an oddball raw-IP instead of *.sun.com and fetched
at less than 1Mb/s -- are you sure it doesn't require 64-bit WinXP
Pro?) finished.

Fine, but it stole the focus, ate several keypresses, and nearly
destroyed this half-edited post in the process. For some reason,
something popped up, grabbed the focus, then disappeared. Then this tab
scrolled around a bit by itself and disappeared. Well, the form
disappeared. It was apparently trying to go to a different site.

Of course, the form contents would still be here if I returned from
there, because this is Firefox, not Internet Exploder. Except that it
seemed specifically to be going to gmail, and it seemed to be doing so
because it thought I'd clicked at least 3 times (rather than the actual
0, hands not having been anywhere remotely close to the mouse) on the
"back" button.

As I'm sure you're well aware, gmail exhibits broken behavior, at least
in Firefox, in that if you go "back" to it, the "forward" button greys
out. Somehow gmail hijacks your browser and compels it to dump its
forward history, perhaps to "punish" people who leave and then return
(why though??).

Of course, if that had happened, the contents of this form would have
been destroyed irrecoverable.

This makes the Firefox bug triggered by typing into a form while a
download is finishing a Class A Showstopper (severe, difficult to
guaranteeably avoid, no known workaround, capable of causing
catastropic loss of data without hope of recovery)!

I only recovered because I realized what the thing was trying to do in
time and hit the forward button several times rapidly before it had
loaded anything from gmail. If it had, gmail would have sent whatever
code it sends that destroys the browser's forward history almost
immediately. Thank Christ gmail's servers are so slow. I never thought
I'd be saying that. Jesus.

OK, now back to our regular programming. Where was I? Oh yes. I don't
think the server VM is much bigger than the client VM. It's the JDK
that's much bigger than the JRE, but that's because the JDK contains
all the development kit stuff, not because it contains a server VM.
 
O

Oliver Wong

Twisted said:
Oliver said:
I think it's more along the lines of "People are making fun of Java
'cause you have to download a huge 300MB runtime just to run a 200KB
applet.
What can we get rid of from the end-user's stuff to make it as small as
possible?"
[...]
I don't
think the server VM is much bigger than the client VM. It's the JDK
that's much bigger than the JRE, but that's because the JDK contains
all the development kit stuff, not because it contains a server VM.

Every little bit helps (pun intended).

- Oliver
 
T

Twisted

Juha said:
Go to
http://java.sun.com/javase/downloads/index.jsp

Look through the list; Windows x64 things are at the bottom of the list.

jdk-6-rc-windows-amd64.exe is what I came up with. Doesn't Work for
Me(tm) -- when the 40-megabyte file is actually finally downloaded and
is launched, it simply says my processor architecture is not supported
and self-terminates. My processor architecture, of course, being an
Athlon 64. And no, I didn't launch the thing on the wrong box (the
older AMD32 on my desk is not even connected to anything right now), if
that's what you're wondering.

(The bumper sticker on the case reads "My *other* other computer is a
Cray", in case anyone's wondering.)

Now what? I'm not generally *terribly* pleased with recommendations
that result in my transferring 40MB of data from a slow Web server for
an end result consisting of a grand total of 40 bytes of text -- that's
an efficiency of about 0.000001%, in case anyone is wondering that is
bad at math...
 
A

Adam Maass

Thomas Kellerer said:
One thing that strikes me with this implementation: what is the difference
between a WeakReference and a SoftReference then?

The way I remember it:

The referent of a WeakReference does not survive a gc cycle (unless
otherwise strongly or softly reachable);

The referent of a SoftReference may survive a gc cycle (if the VM can free
up enough memory), but is not guaranteed to.


The intent is that weakly reachable objects are collected before softly
reachable objects.
 
T

Thomas Kellerer

jdk-6-rc-windows-amd64.exe is what I came up with. Doesn't Work for
Me(tm) -- when the 40-megabyte file is actually finally downloaded and
is launched, it simply says my processor architecture is not supported
and self-terminates. My processor architecture, of course, being an
Athlon 64. And no, I didn't launch the thing on the wrong box (the
older AMD32 on my desk is not even connected to anything right now), if
that's what you're wondering.

You *are* running a 64bit version of Windows?
 
T

Twisted

Thomas said:
You *are* running a 64bit version of Windows?

No, but I *do* have an amd64 processor. It didn't say anything about
the OS -- it said specifically that it was my processor architecture
that wasn't supported.

Either the message is in error, or the whole thing is in error.

Also, I *specifically* asked in this group about binaries for Win32 on
64 bit processors, not Win64.
 
O

Oliver Wong

Twisted said:
No, but I *do* have an amd64 processor. It didn't say anything about
the OS -- it said specifically that it was my processor architecture
that wasn't supported.

Either the message is in error, or the whole thing is in error.

Also, I *specifically* asked in this group about binaries for Win32 on
64 bit processors, not Win64.

I've lost track of the thread, but in case this information is useful to
you: If you're not using Win64, then you need the 32-bit binaries, not the
64 bit ones. For all intents and purposes, if you don't have a 64-bit OS,
then all your user-programs will treat your CPU as if it were a 32-bit one

- Oliver
 
T

Thomas Kellerer

No, but I *do* have an amd64 processor. It didn't say anything about
the OS -- it said specifically that it was my processor architecture
that wasn't supported.

Either the message is in error, or the whole thing is in error.

Also, I *specifically* asked in this group about binaries for Win32 on
64 bit processors, not Win64.


If you are running Win32 you will only be able to run Win32 programs and
all programs will "think" that you have a 64bit CPI because the CPU will
run in 32bit mode.

*Only* if you run Win64 you will be able to run programs for the 64bit
processors. How do you expect a 64bit program to run on a 32bit OS?

But this is *way* off topic a Java newsgroup now.

Thomas
 
T

Twisted

Oliver said:
I've lost track of the thread, but in case this information is useful to
you: If you're not using Win64, then you need the 32-bit binaries, not the
64 bit ones. For all intents and purposes, if you don't have a 64-bit OS,
then all your user-programs will treat your CPU as if it were a 32-bit one

Really? My experience has been mixed: some 64-bit-enhanced versions of
stuff work fine on my system (Quake 4, for one). Others don't
(ghostscript, Sun's JVM).

Also, it seems strange that my computer would be sold with a 64-bit
processor and a 32-bit OS if that made the processor choice senseless
without an additional purchase by the customer (of a 64-bit OS -- I
assume that you can't just upgrade OEM XP MCE to a 64-bit edition for
free, at least not legally)...
 
O

Oliver Wong

Twisted said:

I haven't tried first-hand experiments, but that's what I've been told
by reliable sources.
My experience has been mixed: some 64-bit-enhanced versions of
stuff work fine on my system (Quake 4, for one). Others don't
(ghostscript, Sun's JVM).

Maybe Quake 4 does some fancy CPU detection and changes instruction set
depending on the results? I have no idea why it would work.
Also, it seems strange that my computer would be sold with a 64-bit
processor and a 32-bit OS if that made the processor choice senseless
without an additional purchase by the customer (of a 64-bit OS -- I
assume that you can't just upgrade OEM XP MCE to a 64-bit edition for
free, at least not legally)...

The 64-bit drivers for hardware haven't matured in terms of
optimizations yet, so a lot of vendors install 32-bit Windows, even on a
64-bit processor, to get better benchmarks to show to their potential
customers.

- Oliver
 
T

Twisted

Oliver Wong wrote:
[snip]

So this means it's just not likely for a while to get full mileage out
of x64 hardware yet? (It's either use a 32 bit OS and some 32 bit apps,
or have some driver inefficiencies?)
 
O

Oliver Wong

Twisted said:
So this means it's just not likely for a while to get full mileage out
of x64 hardware yet? (It's either use a 32 bit OS and some 32 bit apps,
or have some driver inefficiencies?)

As far as I know, correct.

- Oliver
 

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

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top