Closed eternalphane closed 9 years ago
Are you using Builds -> Project/Package/Class
menu? If not, try use that menu since Javatar use its own build system.
If you're already using the build menu above, try writing your own build command in the build_command
key in the settings file.
Javatar always use double quotes when passing to the command line. (Here's in the create_build
method where the build command is building up and run)
Indeed Javatar use double quotes in release branch, but I'm currently using master branch for there's no encoding
key in settings file of the former one. I've tried release branch before but still met some problems and what's worse is that the error log is encoded incorrectly......
I remember the error massage is something like XXX "C:\Program Files\Java\jdk1.8.0_60\lib\tools.jar" XXX
.
Ah, you're using the prerelease version.
For quoting, that's expectable but that should not make the different since a new version of Javatar use Python's shlex.quote
for quoting the string.
Here on line 181, there is an encoding
key for you.
I've just tried in CMD. Python's shlex.quote
will automatically enclose string with single quote......
And after adding double quotes to the keys in settings file it gets stuck at 0%...
Could you try replace generic_shell.py
in core/
with the file below?
https://dl.dropboxusercontent.com/u/65468988/Sublime/Javatar/generic_shell.py
And see if it's works this time.
Thanks, but the URL seems to be incorrect...
Here... both link (above and this link) seem valid to me (I can ensure that I copy and paste it not typing it myself)
The second link cannot work either. Probably due to GFW... I'll try again with VPN connected.
Unfortunately it shows the same error message, and the build script is still javac -sourcepath 'D:\Projects\[Java]\HelloWorld\src' -classpath . -d 'D:\Projects\[Java]\HelloWorld\bin' 'D:\Projects\[Java]\HelloWorld\src\helloworld\Main.java' -Xlint:all
.
Sure, the build script is not changed but that file just changed how the shell receive the command.
I will look into this issue again which might take a while since I currently working on another project. In the mean time you might want to change the shlex.quote
to wrapping double quotes around (if that works for you). Sorry for any inconvenience you might have.
Thanks for your advice. I'll try that later.
I have added the debug message when running the program to Javatar v2.0.0-prebeta. This should returns the run script to the console. If possible, I want you to try running that script in the command prompt yourself (make sure the escape characters has been escaped) so I can ensure that it's the quoting problem not the build system itself.
After modified /core/generic_shell.py
, Javatar is now working quite well on my computer.
The modified core/generic_shell.py
is up (in the Javatar v2.0.0-prebeta). This should solve the quote problem now.
Everytime I try to build java code the following error appears in a new view:
Then I try replacing the build executable
javac
withecho
in user setting and find that Javatar use single quote to enclose paths in build command:However single quote donnot behave as what double quote do in CMD. It regards
'aaa bbb'
as two strings'aaa
andbbb'
instead of one. So what should I do to solve this problem?