Export a Rascal project to a JAR file

2019-08-16 08:12发布

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.

标签: rascal
1条回答
你好瞎i
2楼-- · 2019-08-16 08:42

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).

查看更多
登录 后发表回答