Results 1 to 11 of 11
Thread: Trouble Compiling
- 11-21-2010, 08:09 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 3
- Rep Power
- 0
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 08:16 AM. Reason: info
- 11-21-2010, 10:01 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Just type javac on command prompt and press enter. See what's happening and let us know.
- 11-21-2010, 10:23 AM #3
Run a DIR command from the command prompt. Are the files actually *.java or *.java.txt?It told me that "*.java" would compile my .txt (txt files titled .java) files into .class files.
db
- 11-21-2010, 10:25 AM #4
And don't double post. I've reported your other thread.
Trouble compiling java files
db
- 11-21-2010, 10:28 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 11-21-2010, 11:02 AM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 11-21-2010, 01:14 PM #7
Should be Windows. On *nix the semicolon in the -classpath parameter would be wrong, wouldn't it?my guess is an MS Windows system
db
- 11-21-2010, 01:32 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
- 11-21-2010, 06:32 PM #9
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.unless some weirdo managed to name a file/directory picbot.jar;
db
- 11-21-2010, 06:42 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 11-22-2010, 06:26 AM #11
Member
- Join Date
- Nov 2010
- Posts
- 3
- Rep Power
- 0
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
-
Trouble compiling java files
By winterkid09 in forum Java AppletsReplies: 2Last Post: 11-21-2010, 10:25 AM -
dos compiling error msg.
By gatehrdy in forum New To JavaReplies: 22Last Post: 09-01-2010, 12:06 AM -
how to get compiling
By philgrek in forum New To JavaReplies: 1Last Post: 05-25-2010, 11:53 PM -
compiling trouble
By capacitator in forum CLDC and MIDPReplies: 4Last Post: 06-10-2008, 10:12 PM -
Trouble compiling code
By waelhelbawi in forum New To JavaReplies: 1Last Post: 05-12-2008, 04:25 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks