Quantcast

Maximum PC

It is currently Wed Jul 30, 2014 1:25 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: changing directory permanently
PostPosted: Thu Mar 31, 2005 7:10 pm 
Team Member
Team Member
User avatar

Joined: Sat Feb 05, 2005 2:13 pm
Posts: 491
I am starting programming with JAVA. I am using "Beginning Programming with JAVA" in the dummies series. I use the command prompt to compile and run the programs, but i have to change the directory every time i open the prompt using "cd\<directory name>". I was wondering if there is a way to permanently change the directory so that when i open the prompt it is already where i want it.

i know there are easier ways other than using the prompt, but im new to this, and i just want to do everything "by the book"


Top
  Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 10:58 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
You could write a batch file called cd.bat that would change the directory to where you wanted if you typed 'cd.bat'. All you need is...

Code:
cd C:\My\Java\Directory

Later, as you become more advanced, you could use a batch file (or better yet, a shell script!) to set the classpath too.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 3:03 pm 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
I just make a batch file with one line: cmd.exe

I put it in the folder I want. Then I execute it. Windows will set the path to the current directory :)


Top
  Profile  
 
 Post subject: Re: changing directory permanently
PostPosted: Fri Apr 01, 2005 8:12 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Kybo reminded me of something.... You're going to want to make sure that you have the java bin directory in your path. Try running 'java' and 'javac' from several different directories. Also take a look inside the bin directory, there are some pretty cool tools there.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group