• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting classpath in windows

 
prabhat gupta
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to compile servlets because of some third party packages like Acme's GifEncoder package.how do i set the classpath in windows.should i create a jar file for this.Also tell me some way to keep all packages in one directory and set that directory in my classpath.tell me how all this can be done.
It's urgent.
 
rob mason
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're much better off creating a little command-file to set your development environment. Start by editing a setenv.cmd file that contains the following:
set JAVA_HOME=c:\my\java\bin\dir
set CLASSPATH=.;c:\whereever\Acme.jar;c:\other\class\files
Now, before you start devloping, just type 'setenv' from the command-line. You should be ready to go!
This is a good starting point for building your development environment.
Hope this helps.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what if you close that command line window?

What version of Windows are you using?
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually even more convenient (imo) is always launching my commandline via a batch file with my environment variables set first and then cmd, so that it stays open. From there I can start and stop Tomcat and run ant etc and they will take on the variables.
I thought there was a file in c:\winnt or c:\ somewhere that you could put stuff in to execute before the command line window opened, like autoexec.cmd? Or is that only W95/98?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic