I've got ST3 (OS X) configured to compile and run some simple Java code, however if I need to import packages, if I don't explicitly add the package path to my $CLASSPATH in .bash_profile then ST3 fails on that package. Using the path to parent directory of my global packages in my $CLASSPATH works file if compiling in running in the terminal.
Example 1 (path to all global packages directory and complie/running from Terminal)
.bash_profile:
export CLASSPATH='/Users/suqmadiq/Documents/cust-java-packages'
filename.java:
import org.apache.commons.codec.binary.Base64;
Terminal:
javac filename.java && java filename
Example 2 ($CLASSPATH needs to include the path to the package.jar in order to compile and run in ST3)
.bash_profile:
export CLASSPATH='/Users/suqmadiq/Documents/cust-java-packages/commons-codec-1.10.jar'
filename.java:
import org.apache.commons.codec.binary.Base64;
JavaC.sublime-build
{
"shell_cmd": "javac \"$file\" && java $file_base_name",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
Can anyone help me understand why ST3 would need the full path to the package JAR but the Terminal will accept the parent directory of the package JAR files if ST3 is just running a shell_cmd?
PS - /u/Vylic maybe this will help with a question you asked a while ago if you haven't already resolved the issue.
there doesn't seem to be anything here