Why can't I compile my codes?

Posted on 2001-06-27
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.
Question by:heuer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Expert Comment

ID: 6231959
Dear heuer,

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


Author Comment

ID: 6233407
and how do i go about doing that?

Accepted Solution

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Expert Comment

ID: 6234251
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 optionsifatall there
LVL 92

Expert Comment

ID: 6236520

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


Author Comment

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

Author Comment

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

cheers :)

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
V.simple question about Android packages and libraries 1 46
login form jsp example 2 72
sql import cannot be resolved jsp 3 117
ejb mdb examples 1 39
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

751 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