Java Programming... explain?

Discussion in 'OT Technology' started by Tk, Apr 25, 2003.

  1. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    Alright, as I understand it, Java runs on websites. Well, Java applets, like games, and then Java Script, which is just code in with the html. So is the language the same between Java Script and the Java Applets, and whats just plain Java? What software package do you use for writing Java code? What kind of programs can you write with it?

    Thanks :big grin:
     
  2. kazamobah

    kazamobah Guest

  3. crotchfruit

    crotchfruit Guest

  4. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    so i can download the software to write / compile java from www.sun.com?
     
  5. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
  6. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    JRE or SDK, and whats the difference?
     
  7. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Get the SDK. JRE, Java runtime environment. SDK, software development kit.
     
  8. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    okay, downloaded and installed... all i see is 'Java Web Start' on my desktop and in the start menu... it doesnt give me anything like a code editor though. where do i code at?!
     
  9. crotchfruit

    crotchfruit Guest

    this is off the top of my head, excuse me if it's wrong:

    look in the directory you installed to. there should be a 'bin' subdirectory. for example, if you installed to c:\jdk there should be a c:\jdk\bin directory.

    you want to make this directory part of your path.. do this however you want. one way is to go to control panel->system->advanced->environment variables and add the c:\jdk\bin directory to the "PATH" system variable.

    no, make a class file, like Myclass.java. put your java code in there.

    go to the command prompt and find the Myclass.java file. Type "javac Myclass.java". the javac.exe program is in the bin directory, and is the java compiler.

    you should now how a Myclass.class file. if you defined a public static void Main(String [] args) member, you can now type "java Myclass" and it will run your code. yay!
     
  10. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    wow, sounds like fun. so your telling me there is not real gui editor that i can use? when i was in my c++ class last some kid was doing java in what looked like a microsoft environment :-\
     
  11. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Compiler != IDE. Now you need to go and download an IDE like JBuilder, JCreator, etc. That's where you write your code. Hell, use Notepad. Sounds to me like you need to pick up a book. You can't have every little thing explained step by step. ;)
     
  12. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    Awsome, which would you suggest between JBuilder / JCreator? im going to follow some online tutorials before i buy a book, just to make sure i want to put the time into this language.
     
  13. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    JBuilder hands down.
     
  14. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    sweet, *purchased* that last night
     
  15. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Now that I wake up a little more, you might want to stick with JCreator or a more simplistic editor for awhile. JBuilder does much much more than JCreator, but it comes at a price of confusion for the newbie.
     
  16. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    oh is that a fact... well ill *buy* that over my lunch hour ;)

    im bringing in my lappy so this afternoon is going to be 'learn a new language' afternoon :)
     
  17. PJThomas

    PJThomas Member

    Joined:
    Jun 6, 2002
    Messages:
    611
    Likes Received:
    0
    Location:
    Massachusetts
    We use Visual Cafe at my school. It works pretty well and it has a wizard for creating GUI applications and applets. I think WebGain makes it??
     
  18. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I hope your afternoon is a few months long. ;)
     
  19. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    sup dude...

    well, afternoon is nearing an end.

    i read about 3/4 of a javascript tutorial instead of the java one. the javascript looked a bit easier to start with, but now that i look at java source they look (about) the same.

    could you send me a project that youve done? doesnt have to be anything big, just need an example, and if your code is well documented then thatll help a lot as well. im just going to get familiar with the basic control commands for right now anyways... toying with a text box and a button at the moment.
     
  20. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    hmm, why is it that when i make a button, text box, or anything else, it snaps to the sides or makes the control the size of the frame?
     
  21. Aimless

    Aimless Resident drunkey

    Joined:
    Nov 5, 2001
    Messages:
    2,534
    Likes Received:
    0
    Location:
    Wisconsin
    :nono: Javascript is nowhere near the same thing as Java
     
  22. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Dude, get a book and learn the basics of Java first. Starting with Swing and asking people to give you code is going about this the wrong way.
     
  23. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    I use JCreator and I love it to death

    I have tried JBuilder, didnt need hte fancy stuff, so I stuck with the creator.......for now :)

    |eb_CRX
     

Share This Page