Results 1 to 5 of 5
- 07-18-2007, 05:30 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 35
- Rep Power
- 0
type javac on the command line from any directory of your machine
I have a question. I did everything it said to install, and it gave me a test to see if everything was right, it said, "type javac on the command line from any directory of your machine."
I assumed that meant go to start, then run and type in javac.
However when I do that a Dos window or whatever it's called comes up for just a second, and then closes down.
According to the tutorial it should come up with instructions on how to run javac.
It might be doing that (there's several lines of writing that comes up when I do that) but it keeps closing down. If that is the right thing to do (going to start -> run -> type javac) then how do I get the window to stay up longer, if it's not the right thing to do what is?
Thanks
- 07-19-2007, 04:41 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Javac is just a executable file used to run your *.java file. Have you check the bin folder on Java installation folder of your system. You can see that, it's just an exe file. You can't hold it. If you type javac on Run, it start to sun, and looking the *.java file. If it is not found such a file, close itself.
If you have put the link of that tutorial, I check that what it says.
- 07-19-2007, 01:15 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 9
- Rep Power
- 0
I think after you setup your JDK you should set windows path in
environment variables
path=E:\Program Files\Java\jdk1.5.0_01\bin
and set JAVA_HOME=E:\Program Files\Java\jdk1.5.0_01
javac is java compiler it means you can compile java file from ms-dos prompt
start -> run -> cmd
javac filename.java
after you compile your file javac generate class file
to run class file
java filenameLast edited by vata2999; 07-19-2007 at 01:18 PM. Reason: MISSING SOMTHING
- 07-19-2007, 04:49 PM #4
Senior Member
- Join Date
- Jul 2007
- Posts
- 130
- Rep Power
- 0
it doesn't mean to type it from start->run, da command line means that u gotta write javac followed by .java extension file in the command prompt (cmd.exe in windows)"type javac on the command line from any directory of your machine."
U could find the command prompt from
Start->All Programs->Acessories->Comand Prompt
or u can just type cmd in the Start->run
bout setting the environment variables, besides of what vata2999 just said, u can also do it from da command prompt
just type SET PATH=%PATH%;<da path for ur jre or jdk bin folder right here>
example : SET PATH=%PATH%;C:\Program Files\Java\jdk1.6.0\bin
Initially if u dun change the location when u install java, thats the default location of ur java tools
U can also set da classpath in da same way so that u can put all the source code (.java) u created in a specific folder and then just compile it using javac without having to write ur source code full address all da time
hope this helps silvia ;)
- 07-20-2007, 04:18 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Command line argument
By denisatandi in forum New To JavaReplies: 8Last Post: 10-16-2012, 11:37 PM -
javac not recognized as an internal or external command
By kotoko in forum New To JavaReplies: 28Last Post: 10-26-2010, 04:39 AM -
Java command line
By agouzoul in forum New To JavaReplies: 2Last Post: 04-02-2008, 12:12 PM -
Exporting from the command line
By o1121 in forum EclipseReplies: 1Last Post: 08-09-2007, 07:29 PM -
Unable to execute command line command in java
By LordSM in forum New To JavaReplies: 1Last Post: 08-08-2007, 12:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks