0

So I finaly managed to compile HelloWorld, but only by typing out the entire C:\progra~1\java\jdk16.0.2\javac HelloWorld.java, which left me with some serious blisters on my fingers...

Is there some way I could be able to just say Javac HelloWorld.java?

Thanks if you reply, I'm kinda new to this stuff

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jwenting
0

Go to the directory where HelloWorld.java is located, then use the simpler command. From the command prompt, You can use cd directoryName to change directories on linux and (I think) Windows as well.

0

I tried that. I went to the directory using cd C:\java and the used the simple javac command to compile. Only when I used the full directory of javac as a command did it compile a *.javac

I have also set the path for javac via my computer/properties/advanced/variables

I'll proceed learning java now that I've managed to compile, but I really don't feel like typing out such a long command every time I want to run a program.

0

If you set your environment correctly, just starting a new command prompt will do the trick.

The environment setting changes aren't propagated to currently running applications, and that includes currently running command prompts.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.