This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Use cmd and not an IDE. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Use cmd and not an IDE." Watch "Use cmd and not an IDE." New topic
Author

Use cmd and not an IDE.

Tes Carter
Greenhorn

Joined: Jun 19, 2005
Posts: 4
I'm trying to teach myself to use notepad and the command prompt rather than always using an IDE. I double checked where my file was but still can't deploy the javac Hello.java (as example). I tried to look at help by typing Java but get this error:

Error: could not open 'C:\Program Files\Java\jre1.5.0_01\lib\i386\jvm.cfg'

Would anyone have any ideas on what I'm doing wrong?

Thanks!
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I think it's a great idea for you to use a text editor and the command line. Personally I dislike NotePad, though. You should check out TextPad which is a much more powerful text editor without being a full-blown IDE. Now on to your question:

I have not seen that error before. Have you checked to see if the file it mentions actually exists on your system? It will also help if you can tell us what you did that caused this error. You should also post the code of your Hello.java example even though it's not likely the cause of the problem. This will just help us make sure we understand exactly what you are doing.

Layne


Java API Documentation
The Java Tutorial
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
After doing some research on this error message, I have one more request:

Please post the contents of your PATH variable.
Tes Carter
Greenhorn

Joined: Jun 19, 2005
Posts: 4
My cmd prompt defaults to
C:\Documents and Settings\Tessie>
When I type dir *.java I can see the directory and see my 1 java file which is actually the Hello we all know and love.

My file:
class Hello
{
public static void main ( String [ ] args )
{
System.out.println("Hello World!");
}
}

When I type javac Hello.java I recieve this:
'javac' is not recognized as an internal or external command, operable program or batch file.

Where should I be saving this file? In the bin?

Thanks for your time.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
just put the path of javac in your PATH variable
or you can save your files in /jdk.../bin.


Life called,so here I am.<br />Cheers<br />Niki.:-)
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1817

Tes:

Welcome to JavaRanch! We don't have too many rules here, but one we do have is our JavaRanch Naming Policy. Please read it and then Change your display name to comply (we are looking for a first and a last name).

Thanks.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Tes Carter
Greenhorn

Joined: Jun 19, 2005
Posts: 4
Thank you! I went back to sun and reinstalled everything. Saved it in the jdk/bin and it worked perfectly.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Use cmd and not an IDE.
 
Similar Threads
ActionError Constructor undefined
Error with execution using packages in command line
debug
jsp error
poll - text editor vs development env.