Skip to content

fix jbang integration #184

@sandys

Description

@sandys
java -cp jbang.jar dev.jbang.Main info tools hello.java
{
  "originalResource": "hello.java",
  "backingResource": "/home/user/Code/arakoo/jbang/hello.java",
  "applicationJar": "/home/user/.jbang/cache/jars/hello.java.0234d05aa80b3b31434cce770a25541dc13d2a1a0dd5aa759978fd16fd2091f5.jar",
  "dependencies": [
    "com.databricks:sjsonnet_2.13:0.4.2",
    "ch.qos.reload4j:reload4j:1.2.19",
    "com.google.code.gson:gson:2.8.8"
  ],
  "resolvedDependencies": [
    "/home/user/.m2/repository/com/databricks/sjsonnet_2.13/0.4.2/sjsonnet_2.13-0.4.2.jar",
    "/home/user/.m2/repository/com/lihaoyi/fastparse_2.13/2.3.1/fastparse_2.13-2.3.1.jar",
    "/home/user/.m2/repository/com/lihaoyi/sourcecode_2.13/0.2.3/sourcecode_2.13-0.2.3.jar",
    "/home/user/.m2/repository/com/lihaoyi/geny_2.13/0.6.5/geny_2.13-0.6.5.jar",
    "/home/user/.m2/repository/com/lihaoyi/pprint_2.13/0.6.1/pprint_2.13-0.6.1.jar",
    "/home/user/.m2/repository/com/lihaoyi/fansi_2.13/0.2.10/fansi_2.13-0.2.10.jar",
    "/home/user/.m2/repository/com/lihaoyi/ujson_2.13/1.3.7/ujson_2.13-1.3.7.jar",
    "/home/user/.m2/repository/com/lihaoyi/upickle-core_2.13/1.3.7/upickle-core_2.13-1.3.7.jar",
    "/home/user/.m2/repository/com/lihaoyi/scalatags_2.13/0.9.3/scalatags_2.13-0.9.3.jar",
    "/home/user/.m2/repository/org/scala-lang/modules/scala-collection-compat_2.13/2.4.0/scala-collection-compat_2.13-2.4.0.jar",
    "/home/user/.m2/repository/org/scala-lang/scala-library/2.13.4/scala-library-2.13.4.jar",
    "/home/user/.m2/repository/com/lihaoyi/os-lib_2.13/0.7.2/os-lib_2.13-0.7.2.jar",
    "/home/user/.m2/repository/com/lihaoyi/mainargs_2.13/0.2.0/mainargs_2.13-0.2.0.jar",
    "/home/user/.m2/repository/org/tukaani/xz/1.8/xz-1.8.jar",
    "/home/user/.m2/repository/ch/qos/reload4j/reload4j/1.2.19/reload4j-1.2.19.jar",
    "/home/user/.m2/repository/com/google/code/gson/gson/2.8.8/gson-2.8.8.jar"
  ],
  "availableJdkPath": "/home/user/.sdkman/candidates/java/22.3.r17-grl",
  "compileOptions": [
    "-g"
  ],
  "sources": [
    {
      "originalResource": "hello.java",
      "backingResource": "/home/user/Code/arakoo/jbang/hello.java"
    }
  ]
}%```

instead of the way we are doing right now (in https://github.com/arakoodev/EdgeChains/blob/main/FlySpring/flyfly/src/main/java/com/flyspring/flyfly/commands/jbang/JbangCommand.java), use the `info tools` command to get classpath and jar to execute it. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions