• Post Reply Bookmark Topic Watch Topic
  • New Topic

compiling command for windows  RSS feed

 
sree dhar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think headfirst series is only mac friendly.can anyone pls tell me the windows equivalent command for the following mac command

%javac -classpath /users/bert/applications2/tomcat/common/lib
/servlet-api.jar:classes:. -d classes src/com/example/web/beerselect.java

and pls explain what does the above code do?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the classpath, change : to ;
Change the path separator to \ in the file names.

I think that should do it.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javac command is reasonably common across platforms, but Windows (no surprise) does things a little differently than most other systems. For example, you'll need to replace the : (colon) separator in the classpath with ; (semi-colon) amd use the \ separator in file paths.

The command compiles the beerselect class, specifying the servlet api jar and current folder as the classpath. The destination of the compiled class is the classes folder.

By the way, this is not Mac-specific, It's a standard POSIX command line. Windows is the only commonly used system that uses it's own proprietary notation. You might want to explore the use of cygwin as a terminal emulator that allows you to use POSIX shells.
[ March 30, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!