Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Why can't I compile my codes?

Posted on 2001-06-27
7
Medium Priority
?
266 Views
Last Modified: 2008-03-10
I downloaded JDK 1.3 together with textpad. why is it that whenever I want to compile my codes, the following error message appears.

javac: invalid argument: C:\izal\software design\practice\FrameWithPanel.txt
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -O                        Optimize; may hinder debugging or enlarge class file
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -target <release>         Generate class files for specific VM version


Tool completed with exit code 2

By the way, I'm using Windows ME.
0
Comment
Question by:heuer
7 Comments
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 6231959
Dear heuer,

          You should first configure your TextPad editor by setting the class path to like c:\jdk1.2\lib;

bye
0
 

Author Comment

by:heuer
ID: 6233407
and how do i go about doing that?
0
 
LVL 2

Accepted Solution

by:
barrel earned 300 total points
ID: 6234015
Try to compile a java file instead of a text file, so start with renaming the FrameWithPanel.txt to FrameWithPanel.java.

BArrel
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:rjackman
ID: 6234251
hi
C:\izal\software design\practice\FrameWithPanel.txt
is this the file u are trying to compile?
then pls chage the .txt extension to .java
and try
javac urfilename.java optionsifatall there
chheers
RJ
0
 
LVL 92

Expert Comment

by:objects
ID: 6236520
mohan_sekar,

read the ee guidelines about proposing answers.
heuer has a lot better chance of solving their problem if the question is unlocked.

0
 

Author Comment

by:heuer
ID: 6241022
mohan_sekar sorry man, yours didn't work. barrel's solution is the right one. I made a 'stupid' mistake of ending my file with a .txt instead of .java
0
 

Author Comment

by:heuer
ID: 6241027
thanks barrel. Anyway, I've noticed my silly mistake even before you posted your comments. Thanks again.

cheers :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question