-
Notifications
You must be signed in to change notification settings - Fork 38
Support for .jar files in tasks and debugger #220
Copy link
Copy link
Open
Description
I’m not sure how the maintainers would like to implement this, but it would be great to have support for .jar files without any configuration or at least some mention of it in the documentation for this extension. Below is an example of the Zed settings files I’ve created to make jar files work in my project. I haven’t done much research on this, but I just wanted to get the conversation started. I’m also not sure if using a lib/ folder is better, but here’s the current project structure:
./
├── .zed/
│ ├── debug.json
│ ├── settings.json
│ └── tasks.json
├── MyJar.jar
├── bin/
└── src/
├── Main.java
└── ExampleFile.java
// .zed/settings.json
{
"lsp": {
"jdtls": {
"initialization_options": {
"project": {
"sourcePaths": ["src"],
},
"settings": {
"java": {
"project": {
"referencedLibraries": ["MyJar.jar"],
},
},
},
},
},
},
}// .zed/tasks.json
[
{
"label": "Run Main with jar",
"command": "find . -name '*.java' -not -path './bin/*' -print0 | xargs -0 javac -cp MyJar.jar -d bin && java -cp 'bin:MyJar.jar' Main",
"use_new_terminal": false,
"reveal": "always",
"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"],
},
},
},
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels