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

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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.