15 Replies - 1715 Views - Last Post: 01 September 2011 - 11:09 AM
#1
Command prompt questions
Posted 31 August 2011 - 11:39 AM
Question 1: Every time I use command prompt, I have to change my directory to the directory where my java programs are stored.
The default directory is:
C:\Users\Owner>
I have everything store in a folder right on my C drive's immediate directory. What I'm looking to do is set my directory as a permanent default directory so that I don't have to change it every time.
Question 2: I have jdk1.7.0 installed on my computer. Before compiling my programs, I have to type the following into my command line:
set path=%path%;C:\Program Files\Java\jdk1.7.0\bin
My professor told us that our companion site for our book has instructions as to how to set this path permanently so that we don't have to input this command in every time we open a new instance of command prompt. So far, I've been looking for almost 2 weeks for the instructions on the site, but to no avail. I was wondering if someone could help me to set this up.
Any and all help will be greatly appreciated.
Thank you in advance for taking the time to read and respond.
-Russell
Replies To: Command prompt questions
#2
Re: Command prompt questions
Posted 31 August 2011 - 11:48 AM
#3
Re: Command prompt questions
Posted 31 August 2011 - 11:55 AM
ps. check your PM
This post has been edited by Fuzzyness: 31 August 2011 - 11:55 AM
#4
Re: Command prompt questions
Posted 31 August 2011 - 11:56 AM
#5
Re: Command prompt questions
Posted 31 August 2011 - 12:09 PM
Fuzzyness, on 31 August 2011 - 11:55 AM, said:
ps. check your PM
We are using BlueJ in the class. He told us there are other programs we can use to write and compile Java in, but for this class we have to use BlueJ.
#6
Re: Command prompt questions
Posted 31 August 2011 - 12:17 PM
TheBearKing, on 01 September 2011 - 12:41 AM, said:
I dont expect any error message for changing the path, I did so and many of my class mates did so when studying Java and there was no one who said about errors.....
#7
Re: Command prompt questions
Posted 31 August 2011 - 12:23 PM
Regardless, thanks a lot for the help.
#8
Re: Command prompt questions
Posted 31 August 2011 - 12:34 PM
#9
Re: Command prompt questions
Posted 31 August 2011 - 12:40 PM
Thanks again!
#10
Re: Command prompt questions
Posted 31 August 2011 - 12:46 PM
Well have any issues just post them, I can definitely help with those!
Cheers mate, Happy Coding! :cheers:
Fuzzy
#11
Re: Command prompt questions
Posted 31 August 2011 - 01:23 PM
#12
Re: Command prompt questions
Posted 01 September 2011 - 07:38 AM
TheBearKing, on 01 September 2011 - 12:41 AM, said:
This depends on what you mean. If you edit the path so the only thing remaining in it is C:\Program Files\Java\jdk1.7.0\bin, then yes, it will cause some issues. Append or prepend to the path. I.E. ...
C:\Windows;C:\Windows\Systems32;C:\Program Files\Java\jdk1.7.0\bin;
#13
Re: Command prompt questions
Posted 01 September 2011 - 09:38 AM
#14
Re: Command prompt questions
Posted 01 September 2011 - 09:50 AM
Quote
I have everything store in a folder right on my C drive's immediate directory. What I'm looking to do is set my directory as a permanent default directory so that I don't have to change it every time.
I'm not a windows guy, but if you want to set up a standard default directory, you can probably do it with a batch file. There's probably a pointy-clicky way of doing it as well, but if you're going to program on a machine you should know the scripting languages available to you, and for windows the native ones are batch files and powershell, I think.
Mouses are for users, not for programming. Anything that you can express with a mouse, you can express faster and easier with the keyboard, once you know how to use your computer.
#15
Re: Command prompt questions
Posted 01 September 2011 - 10:53 AM
Quote
I thought i was lazy, which is a good quality in a programmer, but i don't think i'd ever go that far
As someone said above, a batch file will do it. Save the following as something like 'cdj.bat' in %PATH%
REM Set the default project directory set default_project_directory=C:\Users\Owner\jprojects cd %default_project_directory%
This post has been edited by g00se: 01 September 2011 - 10:54 AM

New Topic/Question
Reply



MultiQuote







|