Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access to jar file #43

Closed
windrg opened this issue Oct 26, 2016 · 8 comments
Closed

Unable to access to jar file #43

windrg opened this issue Oct 26, 2016 · 8 comments

Comments

@windrg
Copy link

windrg commented Oct 26, 2016

Summary

Hi,
Whenever opening a plantuml file, it shows "Error : Unable to access to jar file ..."

I didn't change anything except this


(use-package plantuml-mode
     :ensure t
      :init
       (setq plantuml-jar-path "~/.emacs.d/orgtools/plantuml.jar")
      :config
      (add-to-list 'auto-mode-alist '("\\.uml\\'" . plantuml-mode))
      (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
  )

However I could launch it without any problem in a terminal.
Could you let me know what could be the problem on opening uml files in Emacs, please??

@windrg
Copy link
Author

windrg commented Oct 27, 2016

I've added this config but it still complains like the above.

(setq plantuml-java-args '("-jar"))

@skuro
Copy link
Owner

skuro commented Nov 8, 2016

That error message is displayed when plantuml-mode cannot find the PlantUML jar file specified at plantuml-jar-path. Could you please specify:

  • what environment are you running (OS / Emacs version)
  • the rest of the error message (i.e. after Unable to access jar file..)

Of course, make sure that the file at ~/.emacs.d/orgtools/plantuml.jar actually exists and is the version of PlantUML that you want to use.

@windrg
Copy link
Author

windrg commented Nov 8, 2016

Hi,
After updating this package to the recent one, I've tested it again.
And here are my environment and test result

  • OS : Ubuntu 16.04 / Emacs 25.1

  • Error Messages
    . message buffer
    error in process sentinel: PLANTUML Preview failed: exited abnormally with code 1

    . plantuml message buffer
    Command is [-jar|~/.emacs.d/orgtools/plantuml.jar|-charset|UTF-8|-language]

I've double-checked that it exists in ~/.emacs.d/orgtools/plantuml.jar.

@windrg
Copy link
Author

windrg commented Nov 10, 2016

I've found somethig new in Plantuml Preview which could be a clue for this problem.

Error: Unable to access jarfile \~/.emacs.d/orgtools/plantuml.jar

Could you figure out why it has the prefix / in that path, please?

@skuro
Copy link
Owner

skuro commented Nov 10, 2016

Mhhh that might be because of shell-quote-argument. Can you try with the full /home/<user>/.emacs.d/orgtools/plantuml.jar path?

@windrg
Copy link
Author

windrg commented Nov 11, 2016

Yes, it was the culprit. and after doing some tests, I've figured out the below syntax is more appropirate.

(setq plantuml-jar-path (expand-file-name "~/.emacs.d/orgtools/plantuml.jar"))

Thanks for helping me.

@windrg windrg closed this as completed Nov 11, 2016
@skuro
Copy link
Owner

skuro commented Nov 11, 2016

Glad to hear that you found a solution, but I'd like to keep the issue open: it would be best for plantuml-mode to actually support ~/path/to/plantuml.jar styles of configurations.

@skuro skuro reopened this Nov 11, 2016
@skuro
Copy link
Owner

skuro commented Nov 11, 2016

As of ba7420b paths with ~ should be properly expanded, and version v1.2.1was just released to include the change.

Thanks for all the testing!

@skuro skuro closed this as completed Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants