Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25682/src/org/python/pydev/runners
Modified Files:
SimpleJythonRunner.java
Log Message:
Fixed problem while creating jython shell.
Index: SimpleJythonRunner.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimpleJythonRunner.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** SimpleJythonRunner.java 14 Jun 2008 22:14:55 -0000 1.27
--- SimpleJythonRunner.java 14 Jun 2008 23:36:05 -0000 1.28
***************
*** 123,138 ****
if(cacheDir != null){
cacheDir = "-Dpython.cachedir="+ cacheDir.trim();
}
! String[] s = new String[]{
! javaLoc ,
! cacheDir,
! "-Dpython.path="+ jythonPath.toString(),
! "-classpath",
! jythonJar+pathSeparator+jythonPath,
! vmArgs,
! "org.python.util.jython",
! script
! };
List<String> asList = new ArrayList<String>(Arrays.asList(s));
--- 123,154 ----
if(cacheDir != null){
cacheDir = "-Dpython.cachedir="+ cacheDir.trim();
+ }
+
+ String[] s;
+ if(cacheDir != null){
+ s = new String[]{
+ javaLoc ,
+ cacheDir,
+ "-Dpython.path="+ jythonPath.toString(),
+ "-classpath",
+ jythonJar+pathSeparator+jythonPath,
+ vmArgs,
+ "org.python.util.jython",
+ script
+ };
+ }else{
+ s = new String[]{
+ javaLoc ,
+ //cacheDir, no cache dir if it's not available
+ "-Dpython.path="+ jythonPath.toString(),
+ "-classpath",
+ jythonJar+pathSeparator+jythonPath,
+ vmArgs,
+ "org.python.util.jython",
+ script
+ };
}
!
List<String> asList = new ArrayList<String>(Arrays.asList(s));
|