Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Uses for Java?

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,696
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default Uses for Java?

    Sorry for the lazy question, but what are some things that Java is used for in a website? Or is it mostly for offline work. I am very unfamiliar with Java an am thinking of dabbling in a more interactive language like Javascript. Yes, I know there is a big difference between the two, but I am having a somewhat harder time grasping some of the potential of Java and what IT can do.
    Last edited by james438; 07-25-2007 at 04:47 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It can do practically anything. It's used for server-side servlets, frameworks, non-HTTP services, and also for client-side applets, which can interact with Javascript seamlessly. The only limitation is that it's a plugin. Unfortunately, that means Javascript is usually a better choice where possible. Java is generally used where something can't be done in Javascript.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok so, theres two sides to Java. Applications, and Applets. Java Applications are ran with the MS-DOS, or command line. Java Applets are ran with a appletviewer, or your web browser (web browser has to have a java plug-in).

    Java Applications are written from a text editor program (such as notepad), compiled using the "Javac" command into a class, and then ran all in MS-DOS.

    Java Applets are written in a text editor program, compiled into a class by using the "Javac" command, then you are to create a html (Hyper-text-markup-language) document, which you will then use the:
    Code:
    <APPLET></APPLET>
    tags.
    Lets say your class name is: Wonderful.class
    it would be:
    Code:
    <APPLET CODE="Wonderful.class", WIDTH=300, HEIGHT=400></APPLET>
    As you well know, Java Applets can create animated pictures, games, and more!

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ok so, theres two sides to Java. Applications, and Applets.
    There are a lot more things that can be done with Java (servlets for a start), but they're not different enough to be considered "sides" of Java. The only difference between servlets, applets and applications is how they're called. There's no fundamental difference to the Java programmer: an application can usually be "converted" to an applet just by adding an appropriate start() method, and an applet can generally be "converted" to an application just by adding a main() method that instantiates the applet and calls its start(). The same program, if it has both a main() and a start() method, can be both an application and an applet (although applications generally require a (J)Frame in which to display the (J)Applet).
    Java Applications are ran with the MS-DOS, or command line.
    MS-DOS doesn't even exist on recent versions of Windows (cmd.exe is not DOS), nor does it exist on many of the other systems that are supported by Java. Moreover, Java is perfectly capable of creating graphical applications, and the standard runtime library contains not one but two toolkits (AWT and Swing) for precisely this purpose.
    then you are to create a html (Hyper-text-markup-language) document, which you will then use the:
    Code:
    <APPLET></APPLET>
    tags.
    Hyper-Text-Markup-Language-is-three-words-one-of-which-can-be-hyphenated-not-one-big-one-with-hyphens-instead-of-spaces (deep breath). More importantly, the <applet> element is deprecated for <object> and has been for quite some time.
    Last edited by Twey; 08-25-2007 at 12:38 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hyper-Text-Markup-Language-is-three-words-one-of-which-can-be-hyphenated-not-one-big-one-with-hyphens-instead-of-spaces (deep breath).
    hehe (deep breath). I know im not up to date with Java since Iam using Java 2.0, and that im running it on my grandma's computer which has windows millenium with a netscape navigator browser. So yeah, I'm glad you told me these things, and i will be sure to say the most-up to date thing i can think of

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    When I say "quite some time" I mean "since the advent of HTML4, about a decade ago" The other points I made have always been the case, even in Java 1.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so your sayin i can use <OBJECT CODE=".CLASS">

  8. #8
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    about the MS-DOS though, my windows says thats what it is...

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    so your sayin i can use <OBJECT CODE=".CLASS">
    That's not how <object> works. See HTML 4.01 &#167;13.3 Generic Inclusion: the OBJECT element.
    about the MS-DOS though, my windows says thats what it is...
    Windows ME still does have DOS. Later versions don't. I'm unsure if it was removed in NT or 2000.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Windows ME still does have DOS. Later versions don't. I'm unsure if it was removed in NT or 2000.
    There's DOS (disk operating system) and there is DOS (the command prompt). I never had 2000 or ME (sounds like the same thing). NT was the first OS I used that didn't rely upon DOS as a disk operating system in the traditional way of former Windows machines, but it still did bootstrap from a form of it, as does XP (has autoexec.bat and config.sys, but doesn't really rely upon them), Vista may be another story, I'm not familiar with it yet. I later configured a legacy machine to use 95, it still used DOS as the primary OS, though it skipped over it as fast as possible (not nearly fast enough, in most folk's opinions). In NT, the supplied DOS prompt had many more capabilities than previously, like 4DOS, if anyone recalls that. XP is an advanced (from the point of view of the folks writing the OS) version of NT.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •