• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

This Weeks Giveaway:

 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it reasonably safe to install 1.4 now, or should I wait until it gets worn in a bit? Are the chances of breaking old code outweighed by performance enhancements? Would it be a bad idea to write something using 1.4 specific API this early?
Dave
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James Hart:
...Maybe the introduction of a fundamental language change like generics is enough to justify it


What is/are "generics"? I am unfamiliar with that term/concept.
 
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think Applet is pretty much out of the picture. (sorry!!! if someone is using it) There just no support on iexplorer or netscape the most used two. Who would really consider it if only java version 1.1 or lower is supported ONLY! We all know you can't force you users to dnload the plug-in and if you do they will stay away! If you have a new project coming. Would you consider Applet? I think people will avoid it if they can.
Does Sun has any plan for that? is Web Star replacing applet? or ... ?
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I never really liked applets. I think they died a couple years back so its not really a big thing taking it out of XP. Besides, 1.1 is a dinosaur.
Of course, today, computers are bigger and faster. Before, applets seemed to always crash the client browser, but it doesn't seem to be the case anymore. Still, I believe applets should only be used appropriately and only if it adds true value.
BTW, when did Netscape stop shipping with a plug-in?
 
Fei Ng
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when did Netscape stop shipping with a plug-in??
netscape ship with it? Sorry, didn;t know that.
So, it is bulid in within Netscape?? or u still have to intall it?
Anyway, guess how many people use netscape to view javaranch.com?

MSIE 5 1502721 74.18%
MSIE 6 121029 5.97%
Netscape 4 242984 11.99%
Netscape 6 26125 1.28%
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by FEI NG:
Hi,
Does Sun has any plan for that? is Web Star replacing applet? or ... ?


I wrote CORBA Applet once. It was really a nightmare. I think Java Web Start mignt draw client developers out of version hell.

Doug.
 
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jason Kilgrow:
What is/are "generics"? I am unfamiliar with that term/concept.


Generics is a proposed amendment to the Java type system that allows you to write classes in such a way that they can handle any kind of object in a type-safe manner. Take collections, for example. With Collections now, we have to write code like this:
<code>
List a = new ArrayList();
a.add("hello");
a.add("world");
String b = (String) a.get(0);
</code>
Now, there's an explicit cast in there, and that means this code isn't typesafe. It means we're making an assumption at compile time about something that will be the case at runtime - that the returned value from the List will be a String. Generics is a way of allowing the compiler to help us out with these sort of problems. In a generic compiler, you can write:
<code>
List a = new ArrayList<String>();
a.add("hello");
a.add("world");
String b = a.get(0);
</code>
Now, we're saying that we want the ArrayList to be an ArrayList of strings - so the compiler knows only to let us put strings in, and knows that values we get out will be strings already.
To use generics, you need to write classes in such a way that they're parameterizable. The early access release of the generics compiler, which you can get from Sun, comes with a generic collections library that you can compile code just like that shown above against.
The compiler writes standard bytecode, though, by inserting explicit casts. But the difference is, the compiler is guaranteed only to insert casts where it can guarantee they'll succeed.
It has the potential to radically improve the reliability of Java code, and allows you to reuse code much more efficiently.
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
 
James Hart
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by FEI NG:
We all know you can't force you users to dnload the plug-in and if you do they will stay away! If you have a new project coming. Would you consider Applet? I think people will avoid it if they can.


Users only have to download the plugin once. It hasn't stopped people using Flash on their websites. What I think disappoints me most about the applet situation is that Sun doesn't seem to have managed to give applets the status of a plugged-in component. When I visit a web site that uses applets, I want a dialog to pop up (like it does if the site uses QuickTime, or Flash) telling me I need to download and install the Java plugin - and then the plugin installs (without asking me any questions about what I want installed), and the page works. The plugin should check for newer versions automatically whenever it's launched.
Of course, Sun should address download size, to ensure that they don't disrupt users' lives too much.
But for this to work, of course, there's got to be enough sites out there using applets that people realise they have to have the Java Plugin to be able to get the most out of the internet. IF everyone just says 'ah, applets won't work, nobody has the plugin', then nobody will use applets, so nobody will need the plugin.
There's a lot of competition out there. Flash is getting powerful nowadays - did you know it supports downloading of XML data now? - and there's also a lot you can do with Quicktime beyond just playing movies. Curl is an attempt to create a new client-side platform that's more suited to real applications than HTML. I think there's a lot of demand for powerful client-side technologies - and the applet already exists, can draw on a lot of skilled java programmers, and has all the power of J2SE.
Why should applets be dying?


Does Sun has any plan for that? is Web Star replacing applet? or ... ?


I don't think Sun see Web start as a replacement for the Applet. It's a complementary technology for web delivery, that gets applicaitons out of the browser window, and beyond the lifecycle of the page. But there's definitely still a place in the world for applets.
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
 
James Hart
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Garland:
Is it reasonably safe to install 1.4 now, or should I wait until it gets worn in a bit? Are the chances of breaking old code outweighed by performance enhancements? Would it be a bad idea to write something using 1.4 specific API this early?
Dave


The final 1.4 release should happen early next year. Once it comes out of beta, then you should really start to consider upgrading.
But in the mean time, you have nothing to lose from installing 1.4 in a separate directory and throwing together a little batch script that switches your JAVA_HOME and PATH variables between the two installations so you casn try it out.
There really are very few risks of breaking old code - see my post earlier in the thread, timestamped posted December 18, 2001 06:05 PM. What's more risky about moving to 1.4 is writing code that won't run on older systems.
One thing you might want to try is compiling your code using the 1.3 compiler and class libraries, but running it using the 1.4 JVM and libraries. That way, you get all the benefits of the improved performance, and you know your code will still work when deployed on 1.3 systems.
But I'd also advise people to move as fast as possible to developing on and for 1.4, and persuade your users, hosting providers, server administrators or whoever else you need to to upgrade as soon as possible.
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
 
James Hart
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stanley Tan:
I never really liked applets. I think they died a couple years back so its not really a big thing taking it out of XP. Besides, 1.1 is a dinosaur.


I think XP taking out that crippled MS JVM which only supported 1.1.8 may be the best thing that's ever happened to applets. If Sun can actually get the plugin rolled out properly, you won't have to write applets targetting 1.1.8 any more - you'll be able to target 1.3.1, maybe even 1.4.
The lack of Java 2 support in the default plugins has crippled applets. Now there is no default plugin on windows, you can actually expect users to go and download the real Java plugin. This is a good thing, right?
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fei,
Where did you get those stats?
James,
Isn't there some sort of code you can insert in your Web pages that will prompt the user to download the plug-in? I know HTML converter from Sun does this, but I can't remember if the process is seamless. (it's been a long time... )
 
James Hart
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James Hart:
Generics is a proposed amendment to the Java type system that allows you to write classes in such a way that they can handle any kind of object in a type-safe manner.


By the way, (shameless plug) generics and JAXB are examined in the book, in the last chapter, which looks at the future of J2SE.
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
 
James Hart
Author
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stanley Tan:
James,
Isn't there some sort of code you can insert in your Web pages that will prompt the user to download the plug-in? I know HTML converter from Sun does this, but I can't remember if the process is seamless. (it's been a long time... )



You're right, there is - but it's not that widely used (Java developers, pay attention), probably because too many developers think of applet as a 1.1.8 platform, and just target the default JVM, rather than bothering with the plugin. Plus, it's a lot easier to use an <applet> tag - even the front page of java.sun.com does precisely that. Here's the full code, as recommended by Sun, for including an applet in your page in a browser-compatible way:
The following code is specified at the beginning of the <BODY> tag.
<pre>
<SCRIPT LANGUAGE="JavaScript"><!--
var _info = navigator.userAgent; var _ns = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0
&& _info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
var _ns = (navigator.appName.indexOf("Netscape") >= 0
&& ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0
&& java.lang.System.getProperty("os.version").indexOf("3.5") < 0)
| | _info.indexOf("Sun") > 0));
//--></SCRIPT></COMMENT>
</pre>
The following code is repeated for each APPLET tag
<pre>
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) document.writeln('
<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="200" height="200" align="baseline"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<NOEMBED><XMP>');
else if (_ns == true) document.writeln('
<EMBED
type="application/x-java-applet;version=1.3" width="200" height="200"
align="baseline" code="XYZApp.class" codebase="html/"
model="models/HyaluronicAcid.xyz"
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
<NOEMBED><XMP>');
//--></SCRIPT>
<APPLET code="XYZApp.class" codebase="html/" align="baseline"
width="200" height="200">
</XMP>
<PARAM NAME="java_code" VALUE="XYZApp.class">
<PARAM NAME="java_codebase" VALUE="html/">
<PARAM NAME="java_type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</APPLET></NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET code="XYZApp.class" codebase="html/" align="baseline"
width="200" height="200">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</APPLET>
-->
</pre>
Simple, huh?
On the other hand, a Flash movie is embedded like this:
<pre>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="900"
height="675">
<param name=movie value="mainindex.swf">
<param name=quality value=high>
<embed src="mainindex.swf"
quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash"
width="900"
height="675">
</embed>
</object>
</pre>
So surely Java can be done more simply than it is.
Is it any wonder people use the <applet> tag, and just accept the default applet support?
------------------
James Hart
Wrox
Author of "Early Adopter J2SE 1.4"
[This message has been edited by James Hart (edited December 20, 2001).]
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hehe. Good point!
But why would anyone have to go through that? Just write the normal applet tags and let the converter from Sun do the rest. Voila!
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BTW, here's the link:
http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/html_converter.html
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know if installing 1.4 will mess with an existing WebStart installation?
Looks like the next JLS is a work inprogress.
 
Jason Kilgrow
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James Hart:
Generics is a proposed amendment to the Java type system that allows you to write classes in such a way that they can handle any kind of object in a type-safe manner.


OH! Okay! I HAVE heard of generics then. I just didn't know what they were called. Generics is sort of Java's answer to C++ STL.
Thanks for the explanation. I think it will improve the type system a lot!
 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will it be easier, harder, or about thes same to use generics in Java than to write templates in C++? I mean you have to write all of this qualifying code in C++ do you have to do the same or similar for generics? Please excuse my ignorance I had never heard of generics before this thread.

------------------
Jason R. Kretzer
Software Engineer
http://alia.iwarp.com
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi James -
Just wanted to say thanks for your description of generics above. That's by far the simplest and most compelling illustration I've read.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
James thanks for the insight on the WebStart.
------------------
Sun Certified Programmer on the Java 2 Platform
 
Fei Ng
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stanley Tan:
Fei,
Where did you get those stats?
James,


hey Stanley,
www.javaranch.com and go to the very bottom. You will see a little blue sphere icon and just click on it.
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gerry,
I am interested any improvement on applet, so that we can use swing more easily and improve client programs.
Happy holiday.
Ruilin
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>Generics is sort of Java's answer to C++ STL.
Ok, I get it now... hehe.
 
Fei Ng
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ruilin yang:
Thanks Gerry,
I am interested any improvement on applet, so that we can use swing more easily and improve client programs.
Happy holiday.
Ruilin


Hi ruilin,
According to the last few posts, i think don't there will be any improvement for Applet on 1.4. But we were talking about web star as a solution but not a replace. It is a good and excited options. Check out the old posts on Web Star.
[This message has been edited by FEI NG (edited December 21, 2001).]
 
I just had the craziest dream. This tiny ad was in it.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic