8000 Ability to run java program in much simpler way · Issue #375 · microsoft/vscode-java-debug · GitHub
[go: up one dir, main page]

Skip to content

Ability to run java program in much simpler way #375

@yaohaizh

Description

@yaohaizh

From @patelkunal on August 22, 2018 12:40

It would be great functionality to run java main class/program from visual code on click of annotation like Intellij (every main method annotated with nice run green icon). That makes it very easy to just run the java program/main method without any hassle.

Currently debugger-for-java plugin serves the work around by adding entry into launch.json and then select the class from drop-down list (finding it little difficult because I have ten/twenty main method/class inside my workspace). It would be awesome that I can invoke my java program based on context of the main editor with main method annotation. And since this plugin knows the classpath based on either maven/gradle builds, it would be easier to invoke the main method from the annotated icon. Again this is my wish to have it but it would improve developer experience up-to great extent.

Attaching reference images about requested feature
screen shot 2018-08-22 at 6 06 15 pm
screen shot 2018-08-22 at 6 06 24 pm

I have also been using vscode for tutoring algos/cs-problem-solving where I am using have multi-modules build with many-many main classes (because its easy to explain the concept rather than worrying about best-practices at that moment). And when I press F5, it gives me long list of dropdown to select my main class which I want to run.

I have also explored code-runner plugin but it just dumb way of typing out command and its difficult to work with classpath and other modules settings. And again I have to maintain commands for all of my main class - why can't that main method can be identified by plugin and get nice annotation to make it easier to run.

Environment
  • Operating System: MacOS
  • JDK version: 1.8.0_172
  • Visual Studio Code version: 1.26.1
  • Java extension version: 0.29.0

Feel free to mark duplicate if this is already been handled (though couldn't find in issues here).

Thanks in advance,
/kp

Copied from original issue: redhat-developer/vscode-java#615

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0