Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use cmd and not an IDE.

 
Tes Carter
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After doing some research on this error message, I have one more request:

Please post the contents of your PATH variable.
 
Tes Carter
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just put the path of javac in your PATH variable
or you can save your files in /jdk.../bin.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tes Carter
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! I went back to sun and reinstalled everything. Saved it in the jdk/bin and it worked perfectly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic