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

Execute Java code instead of groovy: !!eval-javac: #21

Open
3 tasks
Unihedro opened this issue Nov 27, 2014 · 5 comments
Open
3 tasks

Execute Java code instead of groovy: !!eval-javac: #21

Unihedro opened this issue Nov 27, 2014 · 5 comments

Comments

@Unihedro
Copy link
Owner

Compiles and runs code, be it Java statements or Java classes.

!!eval-javac: (code)

We need this because Groovy isn't of Java syntax, plus it doesn't support JDK8. Using Java code execution will allow running code of the same Java compliance level as the runtime, using JavaCompiler.

Plus, this will be a great opportunity for me to take a break from Vincentyification/JChatExchange, so I'm going to self-assign this and work on it.


  • Execute Java code command: !!eval-javac:
  • Learn a command from the user: !!learn
  • Execute code from online
@Vogel612
Copy link
Collaborator

might be interesting to integrate code compiled like this to a !!learn command for later use

@Unihedro
Copy link
Owner Author

Good idea, I like that a lot. Following that we should also establish running code from gists, pastebin and pastie. For now I'll do it in the following order:

  1. Execute Java code command: !!eval-javac:
  2. Learn a command from the user: !!learn
  3. Execute code from online

Which I also added as a checklist to the main post.

@Vogel612
Copy link
Collaborator

Vogel612 commented Dec 1, 2014

This will deprecate the old !!java-command, right?

@Unihedro
Copy link
Owner Author

Unihedro commented Dec 1, 2014

It never worked properly anyway. I've never been able to compile a class.

@Vogel612
Copy link
Collaborator

Vogel612 commented Dec 1, 2014

Then I'll just kick that out in my current working branch ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants