jbang

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

Stars
1.3K
Committers
91

Bot releases are visible (Hide)

jbang - v0.61.1

Published by github-actions[bot] almost 4 years ago

Features

  • jbang app install --native (#667) (#b5008305)

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.

jbang - v0.61.0

Published by github-actions[bot] almost 4 years ago

0.61.0 (2021/01/14)

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.

Features

  • allow quarkus dev mode (#666) (#1e8e569e)
  • add //DESCRIPTION tag in scripts (#660) (#c4544293)
  • Add export --portable (#637) (#a6103627)
jbang - v0.60.0

Published by github-actions[bot] almost 4 years ago

0.60.0 (2021/01/10)

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.

Bug Fixes

  • do not fail on unrecognized OS like arm64 for new macs. should at least try run located java. (#657) (#9d8b614c)
  • have app install use better derived name (#659) (#26cb5e6f)

Features

  • --jsh to allow forcing .jsh (#658) (#bbab86ec)
jbang - v0.59.0

Published by github-actions[bot] almost 4 years ago

0.59.0 (2021/01/08)

Made vscodium installation ask before installing and added -V and --version as shortcuts for version info.

Bug Fixes

  • fix some spotbugs warnings (#643) (#af160e3d)

Features

  • add -V/--version for basic version info. Fix #601 (#b92a9e06)
  • ask first before downloading default editor (#649) (#22a4a4a5)
jbang - v0.58.0

Published by github-actions[bot] almost 4 years ago

0.58.0 (2021/01/03)

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.

Features

  • Download and setup vscodium if no editor available. (#638) [minor] (#0577d1fd)
  • Default editor --open witohut editor opens default editor
jbang - v0.57.0

Published by github-actions[bot] almost 4 years ago

0.57.0 (2020/12/28)

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.

Bug Fixes

  • use environment variable GITHUB_TOKEN while accessing GitHub API… (#590) (#4dcd5dc0, closes #168)
  • Make app install --force work (#592) (#aa3eac30, closes #589)
  • download of jar via https directly works now (#0b79cea6)
  • remove twitter support as twitter don't want us to have nice things. Fix #615 (#3b8e36d4)
  • REPOS with just hostname no longer gives error Fix #614 (#da3f33f6)
  • add sponge repo alias (#616) (#6cafd6c8, closes #610)
  • app install --force now properly overwrites (#623) (#ae76cf1c, closes #620)

Features

  • add --force to export (#628) (#6f2a42b5, closes #609)
  • enable assertations (#629) (#9ec140d7)
  • add notion of default application (#630) (#5f168e49)
jbang - v0.56.0

Published by github-actions[bot] almost 4 years ago

0.56.0 (2020/12/06)

Big jbang app feature + bugfixes.

jbang app install

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 jitpack and repos

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.

jitpack now works with repos not using master as default branch

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

Bug Fixes

  • Don't attempt to minimse jboss-logging (#562) (#8fc92b68)
  • PowerShell zero-install now works again (#572) (#f61aa98c)
  • app install with relative file paths now works (#2767b22b)
  • handle the fact that on Windows paths can be on different roots (#777d7870)
  • watchService's event is relative to watched directory (#7395c4fb)
  • use dependency cache when launching GAV. (#586) (#44a88580, closes #222)
  • support urls with extension less files Fixes #568 (#585) (#fbdec5c2, closes #568)
  • jitpack no long assumes default branch is master (#588) (#654667ca, closes #564)

Features

  • minimal jitpack and //REPOS support in edit/live mode (#570) (#f134fb5c)
  • added install command that turns scripts as user commands (#5406bae8)
  • implemented app unistall and app list (#63973382)
  • // commands ignore // comments (#584) (#732cc69b, closes #567)

Refactor

  • split jbang installation off from setup to install
  • Introduce app command and turn install into a subcommand
  • Made setup a subcommand of app
  • app install name is now an option
jbang - v0.55.2

Published by github-actions[bot] almost 4 years ago

0.55.2 (2020/12/01)

Bug fixes - mainly #562 to avoid breaking Quarkus build integration.

Bug Fixes

  • running tests won't affect user's environment anymore (#553) (#fdcd0ff1)
  • attempt of a more explicit edit message (#555) (#f15cd878, closes #551)
  • Don't attempt to minimse jboss-logging (#562) (#15c89b87)
jbang - v0.55.1

Published by github-actions[bot] almost 4 years ago

0.55.1 (2020/11/26)

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.

Bug Fixes

  • installation of Jbang from startup scripts now works again (#ea40fc14)
  • jbang setup should gracefully fail on mising bash/zshrc (#5395fa1a)

Refactor

  • simplified setup of Jbang
jbang - v0.55.0

Published by github-actions[bot] almost 4 years ago

0.55.0 (2020/11/26)

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.

Bug Fixes

  • Fixed more instances of relative file handling (#543) (#361a9f62)

Features

  • jbang setup (#540) [minor] (#fad20f0b)
jbang - v0.54.1

Published by github-actions[bot] almost 4 years ago

0.54.1 (2020/11/24)

A quick bug fix so //FILES myresource.png when called via aliases and swizzled urls resolves properly.

Bug Fixes

  • Fixed relative path handling in FileRef and URLRef (#538) [patch] (#822a1a47)
jbang - v0.54.0

Published by github-actions[bot] almost 4 years ago

0.54.0 (2020/11/22)

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

Features

  • force update. Add -f --fresh flag (#495) (#49ae10ef)
  • added snap publishing on tag (#2ba737ee)
  • .jsh auto imports java.util.,java.io.,java.net.*,java.math.BigInteger,java.math.BigDecimal

Bug Fixes

  • use shell comment in direct run example (#500) (#b5d22bdd)
  • remove brew explicit dependency on java being installed (#dd66cf7c)
  • build.gradle having full classname (#6bc5a0e1, closes #18)
  • Default JDK wasn't properly set on Windows (#525) (#6804ecc8)
  • jfxname magic property fixed on windows Fixes #526 (#527) (#03e315cf, closes #526)
  • long classpath problem on Windows (#524) (#6310bbd4)
  • do not pickup commented out @Grab (#d943577f, closes #434)
  • #18: enable gradle run, fix 'build.gradle' formatting (redundant tabs) (#d26e6382)
  • #519: Fix disabled ::add-path:: command in ci-build (#520) (#c0fb96d8)

Refactor

  • build() now cleans up after itself (#499)
jbang - v0.53.2

Published by github-actions[bot] almost 4 years ago

0.53.2 (2020/11/09)

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

Features

  • run jar from a https url (#890787f8, closes #490)
jbang - v0.53.1

Published by github-actions[bot] almost 4 years ago

0.53.1 (2020/11/08)

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.

Bug Fixes

  • aliases no longer look for master, asks for HEAD instead (#0a93f0c1, closes #485)
  • original source must be what's in ScriptResource.originalSource (#488) (#3885a0a8)
  • it must allow same //SOURCES in different paths (#489) (#6337d26f)
jbang - v0.53.0

Published by github-actions[bot] almost 4 years ago

0.53.0 (2020/11/07)

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.

Features

  • search //SOURCES and //DEPS in multiple files (#169e67c4)

Bug Fixes

  • support nested multiple sources and gist with specific filenames (#924e2963)
  • better check for String contains main method (#468) (#87ff6813)
  • update base path when resolving //SOURCES (#477) (#2c372185)
  • jbang cache clear --deps (#be3c2b37, closes #475)
  • fail if class name for is not valid java (#ecc1b19d, closes #460)
  • #274: brew install now should work out of the box since no longer keg_only (#e5f85afc)
jbang - v0.52.1

Published by github-actions[bot] almost 4 years ago

0.52.1 (2020/10/27)

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.

Bug Fixes

  • #459: aliased GAV now resolving correctly (#8e74b5ae)
  • allow MSYS2 to pass OS check in jbang script (#66dccf4a)

Features

  • Added support downloading JDK if not found on Raspberry Pi (#457) (#72959205)
jbang - v0.52.0

Published by github-actions[bot] about 4 years ago

News

0.52.0 (2020/10/16)

A few highlights in this release:

Easy local alias creation

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.

Alias lookup and Local catalogs

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.

Helping Tools

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

version.txt in release artifacts

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.

Bug Fixes

  • cleanup based on eclipse IDE findings (#e063d3fd)
  • Default alias name when creating a new alias (#436) (#f4fa8c55)
  • Jbang won't print extra newline when no output was generated (#412) (#765d8ccb)
  • have random edit examples for jbang init (#ba22be2d, closes #310)
  • add readme.md to edit (#bd7dd36c, closes #210)
  • version.txt now generated as part of build and thus github release (#402c3bb4, closes #388)

Features

  • Implement local catalog indices (#e740c0a2, closes #406)
  • Unqualified aliases are now also looked up in local catalogs (#44d15990)
  • Added ability to explicitly add implicit catalogs (#e0af545d)
  • initial info command for tools (#702dfd89)

Refactor

  • Code refactor and now using jbang-catalogs.json
  • Store implicit catalogs in a separate user config file
jbang - v0.51.1

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.

Bug Fixes

  • bug: Remove interactive flag from sh (#a5de3b78, closes #407)
  • Windows testing broken (#379c3be1)

Features

  • add viewics.java to render ics files in jfx agenda (#1f19ccbe)
jbang - v0.51.0

Published by github-actions[bot] about 4 years ago

News

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.

Bug Fixes

  • stop using -jar for jar runs. (#8a773825)

Features

  • support files named xyz.sh to work more seamless with Intelljs shebang support (#c7386642)
jbang - v0.50.1

Published by github-actions[bot] about 4 years ago

News

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

Bug Fixes

  • We now properly notify Jbang we're running in PowerShell (#bf629dbd, closes #401)
  • fix outdate docs about --live=idea that is not --live --open=idea (#2442beaf, closes #405)
  • add DEPS for JAVAAGENT to boot-class-path in manifest.mf (#d13fde27)

Refactor

  • Jbang zero-install is now located in ~/.jbang/bin [patch]
Package Rankings
Top 6.73% on Proxy.golang.org