Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partest on Windows: problem with long path names #1510

Closed
scabug opened this issue Nov 14, 2008 · 2 comments
Closed

partest on Windows: problem with long path names #1510

scabug opened this issue Nov 14, 2008 · 2 comments
Assignees
Labels

Comments

@scabug
Copy link

@scabug scabug commented Nov 14, 2008

partest (see sbaz package 'scala-test-2.7.2.final.sbp) doesn't support long path names on Windows.

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\PROGRA~1\Scala>echo %JAVA_OPTS%
-Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M

C:\PROGRA~1\Scala>bin\partest misc\scala-test\files\shootout\hash.scala --show-diff
java -Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M -Dscala.home="C:\PROGRA~1\Scala\bin\.." -Dscalates
t.javacmd="java" -Dscalatest.java_options="-Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M" -Dscalatest
.scalac_options="-deprecation" -Dpartest.debug=true -cp "C:\PROGRA~1\Scala\bin\..\lib\sbaz-tests.jar
;C:\PROGRA~1\Scala\bin\..\lib\sbaz.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-compiler.jar;C:\PROGRA~1\S
cala\bin\..\lib\scala-dbc.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-library.jar;C:\PROGRA~1\Scala\bin\.
.\lib\scala-partest.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-swing.jar" scala.tools.partest.nest.NestR
unner misc\scala-test\files\shootout\hash.scala --show-diff
Loading classes from:
file:/C:/Program Files/Scala/lib/scala-compiler.jar
file:/C:/Program Files/Scala/lib/scala-library.jar
file:/C:/Program Files/Scala/lib/scala-library.jar
file:/C:/Program Files/Scala/lib/scala-partest.jar
file:/C:/Program Files/Scala/misc/lib/fjbg.jar
java.class.path: C:\Program Files\Scala\lib\scala-compiler.jar;C:\Program Files\Scala\lib\scala-libr
ary.jar;C:\Program Files\Scala\lib\scala-library.jar;C:\Program Files\Scala\lib\scala-partest.jar
env.classpath: C:\Program Files\Scala\lib\scala-compiler.jar;C:\Program Files\Scala\lib\scala-librar
y.jar;C:\Program Files\Scala\lib\scala-library.jar;C:\Program Files\Scala\lib\scala-partest.jar
sun.boot.class.path: C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.
jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program
 Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\
classes
java.ext.dirs: C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
Scala compiler classes in: C:\Program Files\Scala
Scala version is:          Scala compiler version 2.7.2.final -- Copyright 2002-2008, LAMP/EPFL
Scalac options are:        -deprecation
Java binaries in:          C:\Program Files\Java\jre6\bin
Java runtime is:           Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode)
Java options are:
Source directory is:       C:\Program Files\Scala\misc\scala-test\files

Testing individual files
testing: [...]\files\shootout\hash.scala                              [FAILED]
1,11c1,4
< java.lang.NoClassDefFoundError: Files\Scala\lib\scala-compiler/jar;C:\Program
< Caused by: java.lang.ClassNotFoundException: Files\Scala\lib\scala-compiler.jar;C:\Program
<       at java.net.URLClassLoader$$1.run(Unknown Source)
<       at java.security.AccessController.doPrivileged(Native Method)
<       at java.net.URLClassLoader.findClass(Unknown Source)
<       at java.lang.ClassLoader.loadClass(Unknown Source)
<       at sun.misc.Launcher$$AppClassLoader.loadClass(Unknown Source)
<       at java.lang.ClassLoader.loadClass(Unknown Source)
<       at java.lang.ClassLoader.loadClassInternal(Unknown Source)
< Could not find the main class: Files\Scala\lib\scala-compiler.jar;C:\Program.  Program will exit.
< Exception in thread "main"
---
> 9999
> 9999
> 13880
> 18699

1 of 1 tests failed (elapsed time: 00:00:05)

C:\PROGRA~1\Scala>

Proposed solution: call GetShortPathName from Java (see link below).

http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 14, 2008

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 21, 2011

Commit Message Bot (anonymous) said:
(szeiger in r26040) Always build command lines in partest as Seq[String] instead of space-separated command.

Closes #1510 which is actually caused by a bad command line string when the path to Java contains a space, and not by long path names per se. References #622 since this commit fixes the specific error described there (not closing because follow-up bugs remain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.