Author: rozagh
Date: 2012-04-11 16:06:07 -0700 (Wed, 11 Apr 2012)
New Revision: 28801

Modified:
   core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.bat
   core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.sh
Log:
fixes #845 KARAF sets the user working directory to framework which causes the 
problem for creating files with relative paths. The .sh and .bat scripts are 
changed for resetting the user.dir system property to the working directory as 
a KARAf option. There might be unforeseenable problems with this change since 
the reason for KARAF changing the working directory is unknown.

Modified: core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.bat
===================================================================
--- core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.bat    
2012-04-11 22:43:36 UTC (rev 28800)
+++ core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.bat    
2012-04-11 23:06:07 UTC (rev 28801)
@@ -6,7 +6,8 @@
 set JAVA_MAX_MEM=1550M
 
 set JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
-set KARAF_OPTS=-Xss10M -splash:CytoscapeSplashScreen.png
+set PWD=%~dp0
+set KARAF_OPTS=-Xss10M -Duser.dir=%PWD% -splash:CytoscapeSplashScreen.png
 
 if not "X%JAVA_HOME%"==X goto TryJDKEnd
 goto :TryJRE

Modified: core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.sh
===================================================================
--- core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.sh     
2012-04-11 22:43:36 UTC (rev 28800)
+++ core3/gui-distribution/trunk/assembly/src/main/bin/cytoscape.sh     
2012-04-11 23:06:07 UTC (rev 28801)
@@ -10,6 +10,11 @@
 if [ `uname` = "Darwin" ]; then
        CYTOSCAPE_MAC_OPTS="-Xdock:icon=cytoscape_logo_512.png"
 fi
-export KARAF_OPTS="-Xss10M -splash:CytoscapeSplashScreen.png 
$CYTOSCAPE_MAC_OPTS"
+PWD=$(pwd) 
+# The user working directory needs to be explecitly set in -Duser.dir to 
current
+# working directory since KARAF changes it to the framework directory. There
+# might unforeseeable problems with this since the reason for KARAF setting 
the 
+# working directory to framework is not known.
+export KARAF_OPTS="-Xss10M -Duser.dir=$PWD -splash:CytoscapeSplashScreen.png 
$CYTOSCAPE_MAC_OPTS"
 
 framework/bin/karaf "$@"

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to