• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open .java file

 
supriya bharadwaj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we open the .java extension file on command prompt?

[Provided meaningful topic - Dave]
[ December 15, 2008: Message edited by: David O'Meara ]
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say 'open' what do you mean?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12084
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a .java file is a text file. any editor will do. every operating system will have SOMETHING you can use, whether it's DOS's "edit", Unix's vi or emacs, etc.

Since you use 'command prompt', I assume you are using Windows. you can probably type:

notepad <file>.java
 
Campbell Ritchie
Sheriff
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use thread titles like "java"; nobody knows what the thread is about.
 
supriya bharadwaj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
open means to show each line of file on command prompt by which we can edit the syntax whenever it necessary.
 
supriya bharadwaj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to open by your given command i.e notepad <filename>.java,but one error is coming that notepad is not recognized as an internal or external command.i am using windows.
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-> edit filename.java
 
Campbell Ritchie
Sheriff
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by James Tharakan:
-> edit filename.java


I never knew that; thank you. That works on Windows.
[ December 15, 2008: Message edited by: Campbell Ritchie ]
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by supriya bharadwaj:
i tried to open by your given command i.e notepad <filename>.java,but one error is coming that notepad is not recognized as an internal or external command.i am using windows.

You should have opened it using Start > Run (or winkey+r, or via start menu, accessories and so on), not as a command in the command console. It is not a DOS command or so, but just a win32 executabele.
 
supriya bharadwaj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok...thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic