Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import a jbang script not having the *.java extension is not possible #48

Open
jmini opened this issue Jan 10, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@jmini
Copy link

jmini commented Jan 10, 2023

As discussed here jbangdev/jbang#676 there are cases where you do not have a .java extension for your Jbang script.

Reproducer<1/summary>

Example:

  • In the folder ~/tmp/tmp2
  • Create the file hello with this content:
///usr/bin/env jbang "$0" "$@" ; exit $?


import static java.lang.System.*;

public class hello {

    public static void main(String... args) {
        out.println("Hello World");
    }
}

Currently those files can not be selected:

Import Jbang Script in Eclipse IDE

@jmini
Copy link
Author

jmini commented Jan 10, 2023

Changing the way scripts are linked in the project as discussed in #47 (comment) would also help here.

Since you can add the extension to the linked file, even if the original file does not have it:

	<linkedResources>
		<link>
			<name>src/hello.java</name>
			<type>1</type>
			<location>/home/jbr/tmp/tmp2/hello</location>
		</link>
	</linkedResources>

@fbricon fbricon added the enhancement New feature or request label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants