Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

im running windows 7 and cygwin (latest)

when i use the cygwin basic console, maven works great

when i open mintty and run mvn, i get this exception

$ mvn --version
java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher.  Program will exit.
Exception in thread "main"

i can't see anything different. here are my environments

$ env
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\slepecw\AppData\Roaming
BURN_AUTOPLAY=C:\Program Files (x86)\Roxio\OEM\Roxio Burn\
COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
COMPUTERNAME=SLEPECW
COMSPEC=C:\Windows\system32\cmd.exe
CYGWIN=nodosfilewarning
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432=C:\Program Files\Common Files
DEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
EMC_AUTOPLAY=C:\Program Files (x86)\Common Files\Roxio Shared\OEM\
FP_NO_HOST_CHECK=NO
HOME=/c/Users/slepecw
HOMEDRIVE=C:
HOMEPATH=\Users\slepecw
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_26
LANG=C.UTF-8
LOCALAPPDATA=C:\Users\slepecw\AppData\Local
LOGONSERVER=\\CAIHDC-DC01
M3=%M3_HOME/bin%
M3_HOME=C:\Users\slepecw\Code\nmsc-misc\maven\apache-maven-3.0.3
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
PATH=/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/c/Program Files/Dell/DW WLAN Card:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/WIDCOMM/Bluetooth Software:/c/Program Files/WIDCOMM/Bluetooth Software/syswow64:/c/Program Files/Intel/DMIX:/c/Program Files (x86)/Intel/Services/IPT:/c/Program Files (x86)/Common Files/Roxio Shared/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared:/c/Program Files (x86)/Roxio/OEM/AudioCore:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files/SlikSvn/bin:/c/Users/slepecw/Code/nmsc-misc/maven/apache-maven-3.0.3/bin:/c/Program Files (x86)/WinMerge:/c/Program Files/TortoiseSVN/bin:/c/Program Files (x86)/Bitvise Tunnelier:/usr/cmd:/usr/bin:/c/cygwin/bin:/c/Program Files/TortoiseGit/bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2a07
PROGRAMFILES=C:\Program Files (x86)
PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
PWD=/cygdrive/c/Users/slepecw
PROGRAMDATA=C:\ProgramData
PROGRAMFILES(X86)=C:\Program Files (x86)
PROGRAMW6432=C:\Program Files
RCAUTOPLAY=C:\Program Files (x86)\Roxio\OEM\Roxio Central 5\
SERVTAG=3V7FWM1
SESSIONNAME=Console
SHLVL=1
SYSTEMDRIVE=C:
SYSTEMROOT=C:\Windows
TEMP=/tmp
TERM=xterm
TIA=10030
TMP=/tmp
USERDNSDOMAIN=CAIHDC.COMPAID.COM
USERDOMAIN=CAIHDC
USERNAME=slepecw
USERPROFILE=C:\Users\slepecw
VSEDEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
WINDIR=C:\Windows
_=/cygdrive/c/Program Files (x86)/Git/bin/env

i would normally start digging with java_home and classpath, but the fact that it works under cygwin's basic shell is just killing me.

share|improve this question
add comment

1 Answer 1

You should check JAVA_HOME, CLASSPATH, and whatever other bits of the environment java might care about. The environment in the console and in mintty won't necessarily be the same, because for example the console is usually invoked via Cygwin.bat, whereas mintty isn't, so if you've set something up in Cygwin.bat it won't show up in mintty sessions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.