1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Java Programming?

Discussion in 'BBS Hangout' started by Lil Pun, Feb 18, 2002.

  1. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    I am taking a class this semester on Java programming. Well, the software that the school gave us isn't working correctly on either of my computers at home so I am looking for a program/software/compiler that I can download over the Internet for free that will allow me to create and execute Java programs and see if they are working correctly. Does anybody know of any sites where I can do this? Oh yeah, I got a lot of Microsoft software as well with my last computer purchase, is there a Microsoft program which allows you to create, compile, execute, etc. Java programs. Maybe I have some softaware that I could use that's just sitting in my face. Any help would be appreciated, thank you.
     
  2. MoonDogg

    MoonDogg Member

    Joined:
    Nov 12, 1999
    Messages:
    5,167
    Likes Received:
    495
    What software did you get from school? What problems did you have installing it?

    The newest Sun version (J2SETM v 1.4) is here.....
    http://java.sun.com/j2se/1.4/download.html But you might want to make sure it's the right version(ask your prof) before you download it.
     
  3. boomboom

    boomboom I GOT '99 PROBLEMS

    Joined:
    Sep 29, 1999
    Messages:
    12,764
    Likes Received:
    9,416
    Ditto on MoonDogg's advice...but if you want a visual IDE, check out the Inprise JBuilder product. I learned to write Java from Notepad and debugging it from the command line, but then was introduce to JBuilder in my advanced Java class and found the ability to step through programs visually pretty appealing.

    But before you download JBuilder, it's always best to learn how to do it the "hard" way so that you'll truly understand the basics...just like mathematics and calculators.
     
  4. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    That's exactly what I downloaded/installed from the software given because it also says you can go to this website. I had no trouble installing it, it's just the program isn't reading my Java files. Do I have to execute one first through the Command Prompt (that's how we do it on campus)???
     
  5. Dr of Dunk

    Dr of Dunk Clutch Crew

    Joined:
    Aug 27, 1999
    Messages:
    46,633
    Likes Received:
    33,636
    Another free IDE for Java would be Sun's Forte. Download the "Community" edition which should be free. JBuilder is more mainstream, though, if that's what you're looking for.

    As for the Microsoft question, it won't be free, but if you can get ahold of their .Net suite, you could program in Visual Basic, C++, C# (I'm about to start learning this now), J# (java), ASP .Net, and technically several more using the Common Language Runtime.

    But then they're Microsoft, they're eeeeevil, right? :)
     
  6. boomboom

    boomboom I GOT '99 PROBLEMS

    Joined:
    Sep 29, 1999
    Messages:
    12,764
    Likes Received:
    9,416
    ???

    Which one is having problems reading your files? If you're referring to JBuilder, then you might need to create a project in order to get your .java file "recognized". Once you create a project, you can add your .java file to that project.
     
  7. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    boomboom, I don't have JBuilder. I have the program mentioned in MoonDogg's post. I am supposed to execute the Java programs just like you said you learned how to do them (write in Notepad, then go through Command Prompt). After installing the program that MoonDogg mentioned I still don't get the Java icon for my programs which is a white sheet with a J on the side but I get the icon that looks like a white sheet with a Windows logo on it.
     
  8. boomboom

    boomboom I GOT '99 PROBLEMS

    Joined:
    Sep 29, 1999
    Messages:
    12,764
    Likes Received:
    9,416
    From what it sounds like, you will need to execute your Java programs from the command line. I'm not sure of your experience level, so forgive me if I'm starting too basic...

    Java will need the JVM to run your Java classes. To compile your classes, use:

    javac filename.java

    Which will create the filename.class file. In order to run the .class file, use:

    java filename

    This should execute your code.

    If this doesn't help or I'm too basic, let me know. Also let me know if you are trying to run an applet or application. The above example is for an application. There are a few more steps required in order to run an applet. Hope this helps!
     
  9. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    My experience level...I've only been working with Java for 2 weeks. Whenever I try to run a application from the command line I get bad file or command. I believe I am doing everything correct. I have my files saved on a floppy so I go into Command Prompt and then type A: then enter then A:/ or something like that pops up then I put in the name of my file on my floppy that I wish to execute. Like I said I don't believe my computer is recognizing the Java files.
     
  10. paikj83

    paikj83 Member

    Joined:
    Aug 17, 2001
    Messages:
    144
    Likes Received:
    1
    Did you remember to set the classpath to the directory with the class files? I forgot to do that when I first installed JDK. Bugged the hell out of me.
     
  11. MoonDogg

    MoonDogg Member

    Joined:
    Nov 12, 1999
    Messages:
    5,167
    Likes Received:
    495
    Sounds like you not only need to set your classpath(as paikj83 pointed out), but your compiler location needs to be set in your system path statement. You can set them as an environment variables or set up a batch file like I used to do.
     
  12. Lil Pun

    Lil Pun Member

    Joined:
    Oct 6, 1999
    Messages:
    34,143
    Likes Received:
    1,038
    I was just about to post a question about the PATH.

    OK, I finally got my first program to execute cleanly with no error messages but I had to do it the long way.

    Now I installed the Java SDK to C:\jdk1.3.1

    Now my AUTOEXEC.BAT screen reads like this:

    SET BLASTER=A220 I7 D1 T2
    SET SNDSCAPE=C:\WINDOWS


    C:\PROGRA~1\COMMON~1\NETWOR~1\VIRUSS~1\40~1.XX\scan.exe C:\
    @IF ERRORLEVEL 1 PAUSE

    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN


    Is this correct or should it be set differently?
     
  13. MoonDogg

    MoonDogg Member

    Joined:
    Nov 12, 1999
    Messages:
    5,167
    Likes Received:
    495

    That should work for your system path. You might need to add another statement similar to this one:

    Set Classpath=

    You'll need to point this to the jdk classes AND to any classes you have created(ie. the ones on your floppy)
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now