Results 1 to 11 of 11
  1. #1
    winterkid09 is offline Member
    Join Date
    Nov 2010
    Posts
    3
    Rep Power
    0

    Default Trouble Compiling

    I'm trying to create an IRC bot using java SE and have run into a problem

    I was given this direction on a site:

    To compile our example IRC Bot, you will need to open a command prompt and navigate to the directory containing the code. Assuming you have Java correctly set up, you can then compile the Bot by issuing the following command: -

    javac -classpath pircbot.jar;. *.java

    It told me that "*.java" would compile my .txt (txt files titled .java) files into .class files.

    This is my first time using a command prompt OR Java, and this is probably a very basic problem.

    PircBot - Java IRC Bot Framework (Java IRC API for Bots)

    ^^ these are the directions I am following.... I really just want to move on, help?

    PircBot Video Tutorial on Vimeo

    ^^ about 12 mins into THIS video tutorial is where I got stuck, I have followed the directions diligently, and I am running windows 7.

    my control panel looks EXACTLY like this guy's until i get the error message after typing the above command.

    The Command Prompt says: javac: file not found: *.java

    I thought *.java was an action........
    Last edited by winterkid09; 11-21-2010 at 09:16 AM. Reason: info

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    It told me that "*.java" would compile my .txt (txt files titled .java) files into .class files.
    Run a DIR command from the command prompt. Are the files actually *.java or *.java.txt?

    db

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    And don't double post. I've reported your other thread.
    Trouble compiling java files

    db

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Darryl.Burke View Post
    And don't double post. I've reported your other thread.
    Trouble compiling java files

    db
    Thanks Darryl, the other thread was closed.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,730
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by winterkid09 View Post
    javac -classpath pircbot.jar;. *.java

    The Command Prompt says: javac: file not found: *.java
    How strange; on Unix/Linux systems the shell does the globbing, i.e. it expands all wildcards like *.java to a list of the corresponding, matching file names; on MS Windows windows systems the commands (such as javac.exe) do the globbing themselves. What system are your trying to run this command on? (my guess is an MS Windows system but I could be wrong)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    my guess is an MS Windows system
    Should be Windows. On *nix the semicolon in the -classpath parameter would be wrong, wouldn't it?

    db

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,730
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Darryl.Burke View Post
    Should be Windows. On *nix the semicolon in the -classpath parameter would be wrong, wouldn't it?
    Yup, hence my guess; unless some weirdo managed to name a file/directory picbot.jar;.

    kind regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    unless some weirdo managed to name a file/directory picbot.jar;
    You know, I didn't think that was possible till I tried it. I would have thought the semicolon wouldn't be allowed in a file name.

    db

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,730
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Darryl.Burke View Post
    You know, I didn't think that was possible till I tried it. I would have thought the semicolon wouldn't be allowed in a file name.
    A semicolon has no special meaning and is a perfectly valid character in a filename in Unix/Linux; what surprises me more is that MS Windows doesn't protest either, both for the colon or the semicolon character. (but it doesn't include them in the final file name if done in a shell ... ).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    winterkid09 is offline Member
    Join Date
    Nov 2010
    Posts
    3
    Rep Power
    0

    Default

    Sorry about double posting, I did because I realized it was in the wrong thread, and couldn't find a delete button afterwards.

    Eranga: javac works fine, i made path to it in the control panel somewhere.

    Darryl.Burke: dir lists the files in the folder and when I did that i realized that the files WERE txt files, and even though I changed the titles to .java, the computer still did not change the extension. just the title.

    I fixed that, thanks :)

    JosAH: I am runnng Windows 7 starter, and it's a real pain.

    Other notes: The semicolon is a seperation between files, and is not in any file name, the period afterwards is signifying an invisible file. As far as it concerns me, the semicolon signifies "and"

    sadly another problem arose, I don't want to go into detail, but when plugging in

    javac -classpath pircbot.jar;. *.java

    it says 8 errors. I can't copy and paste on this system's Command prompt, oddly, but the errors -fter reading them- seem to be troubles with relating pitcbot.jar to the .java files. All of the coding in the .java files is cut into peices and brought up in the errors saying that it can't execute the commands in the aid .java file.

    -.-

    SO it turned out that the .jar file was (either) supposed to be zipped or unzipped, and I changed that and somehow the file duplicated, so when i view the directory from command prompt if says there is...

    <DIR> pircbot
    pircbot.jar

    so there's 2, the second of which is NOT in the folder, but is invisible.
    the first one NEEDS to go, and I cannot figure out any way to make it dissappear even though there is now 0 pircbot files in the actual folder.

    it's become a pain and i have tried more than 10 different approaches but If there any suggestions I have not tried posted after this, I'll tell you if it worked :)

    i did also try a compiler "jGRASP" and i got confused, so I am not going that route again.

Similar Threads

  1. Trouble compiling java files
    By winterkid09 in forum Java Applets
    Replies: 2
    Last Post: 11-21-2010, 11:25 AM
  2. dos compiling error msg.
    By gatehrdy in forum New To Java
    Replies: 22
    Last Post: 09-01-2010, 01:06 AM
  3. how to get compiling
    By philgrek in forum New To Java
    Replies: 1
    Last Post: 05-26-2010, 12:53 AM
  4. compiling trouble
    By capacitator in forum CLDC and MIDP
    Replies: 4
    Last Post: 06-10-2008, 11:12 PM
  5. Trouble compiling code
    By waelhelbawi in forum New To Java
    Replies: 1
    Last Post: 05-12-2008, 05:25 AM

Posting Permissions

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