Export a Rascal project to a JAR file

爷,独闯天下 提交于 2019-12-11 14:52:51

问题


I have a Rascal project I would like to export to a JAR file to be ran like a terminal application, so users can simply run the JAR from command line instead of running it from Eclipse. Is there a way to do this? I tried to export it like a regular Java project but I'm not sure how to specify things such as the JAR's entry point.


回答1:


It depends a bit on the API's your using.

  1. If they are eclipse specific (the jdt submodule of m3) or if they are using the eclipse language services, you'll have to create a plug-in and a feature project. This is not for the faint of heart, but it works. I'll try to find an example.
  2. If you want a terminal like application, you can take the existing unstable/stable jar from the website, and copy your files in there, and update the rascal.mf file to also include your subdirectory in the search path. The shell should work automatically.
  3. If you want to link rascal functions from Java code, you'll have to do some work to correctly connect the evaluator. (And then do point 1 or 2)

So, if you could make your question more specific, I'll make a specific answer to your case, examples included.

(This answer is a bit of a half comment/half answer, sorry).



来源:https://stackoverflow.com/questions/50435487/export-a-rascal-project-to-a-jar-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!