Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] almost 4 years ago
Lets you tell jbang install you would like to have the install use native mode.
i.e. jbang app install --native properties@jbangdev
now when calling properties
it will run natively (build if necessary).
Requires GRAALVM_HOME be set to a working Graal VM.
Published by github-actions[bot] almost 4 years ago
With this release there are now experimental export support of portable jar by using jbang export --portable myapp.jar
.
The produced jar will have a classpath setup to use jars relatively in a lib
directory where all dependencies will be
copied to. That allow you to copy the .jar + lib diretory to another machine and run it.
There is now support for //DESCRIPTION
which will be used when using jbang alias add
as the description used in catalogs.
And finally, jbang build integration passes source locations enabling things like Quarkus to support dev mode. To use this
you need to have a jbang app depend on Quarkus 1.11 or higher and then run with jbang -Dquarkus.dev myapp.java
. Changes
to myapp.java
will automatically be built without need to restart.
Published by github-actions[bot] almost 4 years ago
Users with new shiny M1 Apple devices or other with "unknown" architectures can now run jbang
without complaints.
Also made it possible with --jsh
to force triggering of jshell mode.
Published by github-actions[bot] almost 4 years ago
Made vscodium installation ask before installing and added -V
and --version
as shortcuts for version info.
Published by github-actions[bot] almost 4 years ago
Its all about editing this time.
jbang edit --open xyz.java
will now open your default editor and not require you to
always specify an editor.
Default editor will be what JBANG_EDITOR environment variable is set to
or if that is empty jbang
will now automatically download and configure
a portable vscodium (free/libre Visual Studio code distribution).
This vscodium instance will have java support pre-installed making it
the absolute fastest way to get started developing Java.
As always with anything jbang installs, vscodium is fully optional - it will only happen
if you do not have any editor configured. Thus if you want to use your own IDE/editor you
just continue using jbang edit --open=myeditor xyz.java
.
Note, vscodium install process is slightly different on all three major platforms thus
it is still considered experimental - if you have feedback and can confirm it works (or not)
please do open issue on https://github.com/jbangdev/jbang/issues - Thank you!
Finally -Dkey
is now parsed as Dkey=true
allowing to easily set System properties.
Published by github-actions[bot] almost 4 years ago
Biggest new feature is the notion of default application - what it means is that if you specify a directory or a url ending with a /
then jbang will launch the default application using main.java
.
This lets you do jbang .
to run current directory or things like "running" a web url, i.e. try jbang https://jbang.dev
.
This also allows a default behavior when using jbang
in container, buildpacks, automations, etc.
In addition we got a nice fix from @jeffmaury to have jbang
use GITHUB_TOKEN
when accessing gists/github to reduce throttling.
The sad part of this release is that we had to disable support for tweets as twitter.com seem to have removed support
for getting the text of a tweet without javascript/complex logic.
There are a few other few fixes, all listed below.
app install --force
work (#592) (#aa3eac30, closes #589)app install --force
now properly overwrites (#623) (#ae76cf1c, closes #620)Published by github-actions[bot] almost 4 years ago
Big jbang app
feature + bugfixes.
There is now a jbang app
which install jbang applications/scripts locally.
You use it by first calling the one time setup (jbang app setup
) to configure your local environment
to have a PATH
that jbang
can install "apps" into.
Now you can do things like jbang app install properties@jbangdev
to get a properties
into your PATH
so you can
call it from anywhere as if it was any other application or script.
jbang app install
works with scripts, jars, urls, aliases etc.
Really excited to this come to fruition - send feedback/open issues for this - do you like it or hate it ?
jbang edit
now honor jitpack and //REPOS
so now dependency resolution
will work in your IDE when you use these.
//
commands ignore content after //
This is a small tweak to the parsing so if you have a comment at the end of line of a //DEPS
or similar command then jbang
will ignore it.
That is useful for when using asciidoc reference in comments feature, which gives you this:
//DEPS info.picocli:picocli:4.5.0 // <.>
//DEPS org.zeroturnaround:zt-exec:1.12 // <.>
//DEPS commons-codec:commons-codec:1.15 // <.>
//DEPS org.slf4j:slf4j-nop:1.7.30 // <.>
In previous versions jbang would try and resolve //
and <.>
as dependencies. Now it will ignore '//
' (notice the surrounding spaces) and anything following it.
master
as default branchNew repositories on GitHub defaults to main
breaking the jitpack integration.
Now instead of using master
as default we use HEAD
which gives you the
tip of the default branch independent of its actual name.
app install
with relative file paths now works (#2767b22b)install
command that turns scripts as user commands (#5406bae8)app unistall
and app list
(#63973382)setup
to install
app
command and turn install
into a subcommandsetup
a subcommand of app
app install
name is now an optionPublished by github-actions[bot] almost 4 years ago
Bug fixes - mainly #562 to avoid breaking Quarkus build integration.
Published by github-actions[bot] almost 4 years ago
Bug fixes to setup so curl install actually works without having jbang already installed
and simplified Windows script as turns out we don't need to worry about locked jar files.
Published by github-actions[bot] almost 4 years ago
jbang can now setup and install itself using jbang setup
.
This will setup ~/.jbang/bin
in your PATH
.
Might not look at much but this enables you to do:
curl -Ls https://sh.jbang.dev | bash -s - setup
And after this you have jbang
installed in your path.
Similar is available for Windows powershell.
Published by github-actions[bot] almost 4 years ago
A quick bug fix so //FILES myresource.png
when called via aliases and swizzled urls resolves properly.
Published by github-actions[bot] almost 4 years ago
Mainly a bunch of minor bug fixes and improvements, highlights being:
There are now a --fresh
flag to use to indicate to jbang to use fresh data, not cached data.
Allow you to force a build for a specific run without having to clear the full cache.
When using .jsh there are now default imports added to simplify writing code faster:
import java.util.*;
import java.io.*;
import java.net.*;
import java.math.BigInteger;
import java.math.BigDecimal;
Temporary Gradle now includes application
definition making IDE's like intellij able to provide run/debug out of the box.
Fixed command line handling on Windows so now long classpaths will not fail, but instead use @-file support of java to run with
commands with more than 8192 characters.
JavaFX Windows dependency resolution was broken and should now be fixed!
More details below...
build()
now cleans up after itself (#499)Published by github-actions[bot] almost 4 years ago
Quick fix to have jbang <url-to-jar>
working.
This lets you run joinery which does not publish a proper jar in a maven repository, but does have a .jar posted at an url.
Thus todays bugfix lets you do:
jbang https://bintray.com/cardillo/maven/download_file?file_path=joinery%2Fjoinery-dataframe%2F1.9%2Fjoinery-dataframe-1.9-jar-with-dependencies.jar shell
# Joinery -- Data frames for Java, 1.9-3ea7d54
# OpenJDK 64-Bit Server VM, AdoptOpenJDK, 11.0.8
# Rhino 1.7 release 2 2009 03 22
> df = new DataFrame()
[empty data frame]
> df.add("value")
[empty data frame]
> [10, 20, 30].forEach(function(val) { df.append([val]) })
> df
value
0 10
1 20
2 30
Published by github-actions[bot] almost 4 years ago
Bug fixes, with one notable change/fix that jbang catalog
and jbang alias
commands support
catalogs located in any default branch whether named master
, main
or something else. It will now
look for HEAD
which points to the latest commit on the default branch.
Published by github-actions[bot] almost 4 years ago
Lots of fixes, but also some nice features!
//SOURCES
will now recursively include //SOURCES
and //DEPS
allowing for better reuse/componentization for
multi source scripts/apps.
Yes, multiple source is supported in JBang - it actually been for a while as javac will
automatically include reference classes available relative to a file.
When we realized that worked we enabled jbang edit
to work with multiple files including
proper package handling and now //SOURCES
support file patterns, i.e. //SOURCES model/**/*.java
to include all java files found under model
.
Furthermore you can now even use URL's in //SOURCES
, like //SOURCES https://gist.github.com/tivrfoa/bb5deb269de39eb8fca9636dd3c9f123#file-gsonhelper-java
.
And that last example shows the last major feature you can now refer to individual files via a anchor in a gist url.
Big parts of these were contributed by @tivrfor as his first contributions! Thank you.
Published by github-actions[bot] almost 4 years ago
A few bug fixes and "feature" making it so jbang can now run/install java vm's on Raspberry Pi 3 and possibly earlier versions.
Published by github-actions[bot] about 4 years ago
A few highlights in this release:
Starting with first contribution from @chrsblck in form of enabling jbang alias add -f . myalias path/to/some.java
making it so users don't need to remember the full default jbang-catalog.json
name.
Then we get big improvements for the alias and catalog mechanism.
Now you can setup a set of aliases and catalogs for your project, commit the jbang-catalog.json
and have jbang
work uniformly from any contributor or user inside your project.
This is made possible by alias lookups now will look in all added catalogs - meaning instead of having to do:
jbang gavsearch@jbangdev
you can simply add @jbangdev
as a catalog, ie.
jbang catalog add jbdev jbangdev
and now you can just go:
jbang gavsearch
And it will automatically resolve this to gavsearch@jbangdev
.
For this to work for your "local" project make sure you have used jbang catalog add -f .
or jbang alias add -f .
so you get a jbang-catalog.json
in the root of the project you want to add jbang aliases/catalogs to.
@fbricon started exploring adding jbang support to Eclipse and VSCode thus to help him (and others?) we've added a jbang info
command which can be used to get technical info relevant for tooling.
Example:
jbang info tools githubinfo.java
[jbang] Resolving dependencies...
[jbang] Resolving org.kohsuke:github-api:1.101...Done
[jbang] Dependencies resolved
{
"originalResource": "githubinfo.java",
"backingResource": "githubinfo.java",
"resolvedDependencies": [
"/Users/max/.m2/repository/org/kohsuke/github-api/1.101/github-api-1.101.jar",
"/Users/max/.m2/repository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9.jar",
"/Users/max/.m2/repository/commons-codec/commons-codec/1.13/commons-codec-1.13.jar",
"/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar",
"/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar",
"/Users/max/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar",
"/Users/max/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar"
]
}
The exact format and contents of this output is still very experimental - so don't rely too much on it just yet. Feedback very welcome!
jbang edit
with a README.md
jbang edit now includes a readme with some basic info to explain what the temporary project is all about.
There is now a version.txt
in the released artifacts that tools and install scripts can rely on to easily check if they have the latest jbang release.
Full list of fixes listed below.
jbang-catalogs.json
Published by github-actions[bot] about 4 years ago
Bug fixes to have issue in some commands when using PowerShell on Windows
and stop launching editor in "interactive" mode so Ctrl+C will still work on Fedora and possibly other Linux installs.
Published by github-actions[bot] about 4 years ago
A few fixes/features with some dependabot clanup of dependencies.
First of, running jars no longer uses -jar
, but we just introspect for the main class in manifest and use that by default in a normal java launch with a classpath. This is done since java -jar
will ignore any jar's provided by --classpath
flags which means if your .jar
had any external
dependencies not explicitly listed in its manifest.mf it would fail to run - something very few if any jars available as Maven artifacts has.
Second, to work more smoothly with Intellij new shebang support which makes a file starting with #!
and ///
easy from the IDE, jbang
will now treat xyz.sh
as if it is xyz.java
. This works okey, but I hope Intellij will make their integration smarter so users don't need to use #!
or .sh
named files.
Published by github-actions[bot] about 4 years ago
Just a bugfix release, mainly fixing a issue in zero install for powershell and
adding javaagent dependencies to boot-class-path so you can use 3rd party tools in your agent (like javassist).
~/.jbang/bin
[patch]