Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java and Cygwin  RSS feed

 
Tim Eapen
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody:

I just downloaded cygwin and have been fooling around with it to compile and run simple java programs. I get a lot of class java.lang.NoClassDefFound errors. Here is what I type at the command line:

java -classpath 'cygpath -wp /cygdrive/c/test' jarname.Hello

So I try and use cygpath to convert UNIX style path to Windows style path (i.e. the classpath should be C:\test). The above works when I open up a DOS prompt: java -classpath C:\test jarname.Hello

What am I doing wrong?

Tim
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36432
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Eapen:
java -classpath 'cygpath -wp /cygdrive/c/test' jarname.Hello

Tim,
You are running this in the Cygwin window making it a UNIX command. (I realize this statement is obvious to you, I'm just adding it for anyone reading this.)

In a UNIX command, single quotes mean to leave the String as is. Backward quotes/backticks (`cmd`) execute a command.
 
Tim Eapen
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's awesome Jeanne.

Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!