help with java

This is a discussion on help with java within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I'm trying to set up some java stuff on my computer. I downloaded java sdk 1.4.1 and an IDE (jcreator). ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    85

    help with java

    I'm trying to set up some java stuff on my computer. I downloaded java sdk 1.4.1 and an IDE (jcreator). problem is, when I go and click the compile button in the IDE, I get errors. I don't think the IDE is linking properly with the compiler. I couldn't find out a way in the IDE to set the directory of the SDK.

    I also read that I can compile and execute without an IDE using MSDOS if I add something to the autoexe file. what Do I add?

    and does anyone know a good java message board, and/or know any good websites that explain things so its understandable to a layman?

    thanks

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    what kind of errors are you getting?

    I use JCreater and it works fine And I've never heard of "adding something to the executable" Sounds a little far-fetched to me.
    EntropySink. You know you have to click it.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Sun's site and (I think) JCreator both give simple instructions to get it to work properly - when I get some time, I'll find it.

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Re: help with java

    Originally posted by qwertiop
    I also read that I can compile and execute without an IDE using MSDOS if I add something to the autoexe file. what Do I add?
    Do you mean autoexec.bat? I believe you're refering to the CLASSPATH variable, which stores the location of the java classes (I had to modify it for it to work properly).

    Yes, you can compile without the IDE. In fact, I believe the IDE executes the DOS commands for compilation when you press the RUN-button (or whatever).

    To compile you type: javac filename.java
    (make sure you're in the same folder, or type in a valid path+name)

    To run the program, type: java filename
    (OBS: no extension. Again, make sure the path is correct)
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  5. #5
    tgm
    tgm is offline
    Registered User tgm's Avatar
    Join Date
    Jun 2002
    Posts
    150
    If you install JCreator after you install the JDK it should find it on it's own. If you did it the other way around (or want to use multiple JDKs ie: 1.3 & 1.4) then go to Configure->Options->JDK Profiles. To compile using the command line just add your jdk\bin directory to your system PATH variable.

    /* Edit: I also suggest downloading Sun's Forte IDE. It is an excellent IDE and the community edition is free. */
    Last edited by tgm; 09-10-2002 at 06:00 PM.

  6. #6
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198
    I believe if you change the autexec.bat, that will allow you to compile your program from any location, instead of just the location of the file.

    Also, if you use ms-dos a lot to compile your java programs, you can write a simple bat file to get to the location of your files, instead of typing all the directories every time.
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 03:06 PM
  2. First Java Class at college
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 09-29-2004, 11:38 PM
  3. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 10:07 PM
  4. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 01:37 AM
  5. C or Java as a first language
    By CorJava in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 10-23-2002, 06:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21