Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

Java version & Applet

Thread view: 
pkoerner@online.de - 16 Mar 2007 21:16 GMT
Hi

I got some questions dealing with java-version in junction with
Applets.
When i compile an Applet with my jdk1.6 it can only be used when the
client machine also has at least version 1.6, is that correct?

Using the -target and -source-Switches I can force the compiler to
create a classfile matching a lower version, vor example [1] says -
source 1.2 -target 1.1 is the recommended setting for applets. This
disables features like generics, what would be okay, but how is it
about using packages like javax.swing.* od javax.xml.bind.*, which are
not part of i.e. jre1.1.

It seems that an Applet (or an Application either) would run without
having these classfiles present. So i have to pack the needes
classfiles out of the jars of my jre into my own jar-file.

So, if i want to write an Applet, which target version is really
recommended today (1.1 seems some kind of.. too old?) and how can I
find out which packages i have to pack into the jar.

Peter
Andrew Thompson - 17 Mar 2007 00:39 GMT
On Mar 17, 7:16 am, pkoer...@online.de wrote:
..
> So, if i want to write an Applet, which target version is really
> recommended today ..

If anything is 'really recommended', it would
be that you avoid applets.  Launch an application
using web start, then, even if the client has
not got the minimum Java to needed to run the
application, JWS will prompt them to upgrade.

Andrew T.
Andrew Thompson - 17 Mar 2007 02:37 GMT
> ..

To 'R. Vince' - the email has been deleted unread.
Note the quote..
<http://groups.google.com/groups/profile?
enc_user=7mTjyhYAAADCSWBnolz9mAH1YeBMyEJTo4cocwWvDVg2RHsu8f1bCg>

Got something to say?  Put it on the thread that
it relates to.

( Note - I am not sure if the email relates to
this thread, but the highlit line mentioned
something about applets.. )

Andrew T.
Ike - 17 Mar 2007 11:53 GMT
Andrew,

Didn;t realize it hadn;t come through to the group. Regardless of your
disdain for applets, I'm a big fan of Java Version  Applet. Have you got any
snippet of code to insert into the source of it to
discern version 1.6 ? Thanks Andrew.
Andrew Thompson - 17 Mar 2007 13:24 GMT
..
> Didn;t realize it hadn;t come through to the group.

Cool.  Sorted now.

>..Regardless of your
> disdain for applets, I'm a big fan of Java Version  Applet. Have you got any
> snippet of code to insert into the source of it to
> discern version 1.6 ?

OK - so long as you are aware that I consider
it a 'last ditch effort' at doing something
when the user has no suitable Java, I suppose
I could see my way clear to hunting through
the JavaDocs for ...

..add this one ..
 java.sql.SQLClientInfoException
..it seems to have been introduced in 1.6.

(You already have the code, right?)

HTH

Andrew T.
pkoerner@online.de - 17 Mar 2007 12:37 GMT
Hi there

> If anything is 'really recommended', it would
> be that you avoid applets.
Okay, thats something i have to think about. In this case the applet
is yust a way of using an application without the need to download it,
so Webstart seems just to do that.

Thank you for that hint.
Peter
Andrew Thompson - 17 Mar 2007 13:31 GMT
On Mar 17, 10:37 pm, pkoer...@online.de wrote:
> Hi there
>
[quoted text clipped - 4 lines]
> is yust a way of using an application without the need to download it,
> so Webstart seems just to do that.

Actually, it is more complicated, subtle, and
useful than perhaps I described it.

In seems to the end user, that no 'installation'
happened, where in effect, it does.  The classes
and resources are cached locally.  When the user
launches the application (or applet) again, web
start checks the net to see if there are any
updates, but if it cannot, or there aren't any,
it will launch the app. from the cache.

Further, resources can be specified as either
'eager' or 'lazy'.  Lazy means that the resource
is not download until, or unless, the user needs
that funtionality (think of an entire API that
provides printing support to an app. - if the
user never wants to print, why download it?)

Andrew T.
pkoerner@online.de - 18 Mar 2007 18:27 GMT
I found this one [http://www.physci.org/jws/#fs] as an example what
can be done with JWS and it is very cool to see that JWS only asks for
file-save-permissions, when really a file should be saved. I think
that's what i want to have my own application acting like, so i will
change the applet-functionality into an webstart-service.
Thank you for your hints,

Peter
Andrew Thompson - 19 Mar 2007 02:54 GMT
On Mar 19, 4:27 am, pkoer...@online.de wrote:
> I found this one [http://www.physci.org/jws/#fs] as an example what
> can be done with JWS and it is very cool to see that JWS only asks for
> file-save-permissions, when really a file should be saved.

Yes, I like that aspect of it, as well.

>..I think
> that's what i want to have my own application acting like, so i will
> change the applet-functionality into an webstart-service.
> Thank you for your hints,

You're welcome.

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.