-1

I am compiling a java program that I know works. In OSX I have a classpath of

$ echo $CLASSPATH
/Users/<REDACTED>/SoftwareDownload/MySpecialFolder/lib/Wrap.jar:.

I can then compile using

javac MyPullOne.java

Now in windows i have set $PATH to be

Y:\MySpecialFolder\lib\Wrap.jar

No luck.

I also tried

javac -cp 'Y:\MySepcialFolder\lib\Wrap.jar:.' MyPullOne.java

Still no luck. How do I essentially move over the "CLASSPATH" variable? What is it's windows 10 equivalent?

user1357015
  • 11,168
  • 22
  • 66
  • 111
  • The path won't be `Y:\MySepcialFolder\lib\Wrap.jar:.`, but will probably be `Y:\MySepcialFolder\lib\Wrap.jar;.` – MadProgrammer Feb 16 '18 at 02:27
  • Possible duplicate of [Classpath does not work under linux](https://stackoverflow.com/questions/4528438/classpath-does-not-work-under-linux) – Savior Feb 16 '18 at 02:37
  • Or https://stackoverflow.com/questions/2096283/including-jars-in-classpath-on-commandline-javac-or-apt – Savior Feb 16 '18 at 02:37
  • On windows you should also set CLASSPATH, not PATHlike you wrote in your question – Erwin Bolwidt Feb 16 '18 at 02:39

1 Answers1

3

In Widows, the classpath separator is the semicolon, not the colon.

Simon Berthiaume
  • 643
  • 4
  • 11