Running Java snippets
To debug, we may sometimes send you small Java snippets to run, usually compressed in a ZIP file. To run these snippets, you need to have a SmartGit installation on your system which also comes with its own runtime environment:
-
Uncompress the ZIP file contents to a temporary directory, e.g.
c:\temp\debug -
Open a command line/terminal,
cdto this directory and invoke:Usage
{jre}/bin/java -classpath . {classname} > out.txtSubstitute
{classname}by the class name we have asked you to run and{jre}by the path to SmartGit’s JRE. Depending on your operating system, you will find the JRE at:- Windows: <smartgit-installation>\jre
- Linux: <smartgit-installation>/jre
- MacOS: <smartgit.app>/Contents/Resources/jre
Example
"C:\Program Files\SmartGit\jre\bin\java.exe" -classpath . NioFileSystemWalk "c:\temp\repo" true > out.txt -
If there is an error printed which is not related to a wrong command line usage, also pipe
stderrto a separate file:{jre}/bin/java -classpath . {classname} > out.txt 2> err.txt -
You may investigate both
out.txt(anderr.txt) yourself to figure out possible problems. -
Finally, send us compressed
out.txt(anderr.txt) to [email protected].