JBang @ hack-commit-push 2021 #860
Unanswered
maxandersen
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hack.commit.push May 29th 2021
On May 29th hack-commit-push happens. A day of hacking on and with opens source projects. Open for all and this page is to capture idea/comments for JBang projects participation.
What is JBang
JBang unleashes the power of Java. No setup needed - just code and run with zero to minimal setup. JBang can be used from small scripts to full blown microservices or even JavaFX applications written in Java.
No maven, no gradle not even a install of a JDK nor editor is required to get started. JBang will set it up if you need it.
It lets you get started easily with java running
jbang init helloworld
, you can run the scriptjbang helloworld
and if you need dependencies you just add//DEPS
lines listing the maven coordinates.With
jbang
you can run .java and .jsh (jshell) based files; they can be files locally on disk, Maven coordinates or even aliases defined in a jbang-catalog.json again locally or remotely on source hosting sites such as github, gitlab or bitbucket.In short jbang lets you run and create java code big or small wherever and from where ever your code is.
What happens behind the scenes
jbang
is a small wrapper script written in bash and Windows batch that calls into ajbang.jar
which manages the interaction with tools from the JDK likejavac
,java
andjar
to simplify the workflow. The java code injbang
takes the scripts inputs, does a build usingjavac
if necessary, caches the output and then generates ajava
orjshell
command line that the wrapper script will execute.This means that once the java app is running
jbang
is no longer running.jbang
thus is completely independent and that way it can work with any Java version or possibly in the future any language, especially jvm based ones.Videos
Setup development
Minimal setup is as follows:
You now run
jbang
usingbuild/install/jbang/bin/jbang
or just addbuild/install/jbang/bin
to yourPATH
and runjbang
directly.You should be able to use any Java capable IDE like IntelliJ, Eclipse, vscode or similar to develop on JBang.
Ideas
Good First Issues
Issues marked with 'good first issue'
"App store"
Improve / add to "JBang Catalog" in this PR. Idea is to automatically catalog and index jbang-catalog's on i.e. GitHub and make that searchable for easy lookup.
Add jbang-catalog to your favourite java application
Setup a implicit alias catalog by adding a
jbang-catalog.json
to your favourite java application so they can be run withjbang
out of the box.i.e.
jbang gavsearch@jbangdev
is possible because of https://github.com/jbangdev/jbang-catalog.Example for sqlline: julianhyde/sqlline#430
Create your own awesome jbang script that does something useful
Create a script that does something useful and publish it in your github jbang-catalog repository.
Other ideas
Add your ideas in this discussion thread.
Beta Was this translation helpful? Give feedback.
All reactions