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

ctx.render() doesn't work from "java -jar" #299

Closed
andrea-ligios opened this issue Nov 29, 2018 · 6 comments
Closed

ctx.render() doesn't work from "java -jar" #299

andrea-ligios opened this issue Nov 29, 2018 · 6 comments
Assignees
Labels

Comments

@andrea-ligios
Copy link
Contributor

Describe the bug

The ctx.render() method, as shown in the following code:

public static void main(String[] args) {
    Blade.of()
	 .get("/", ctx -> ctx.render("index.html"))
	 .start(Application.class, args);
}

it DOES work when run from the IDE (Run as Java Application from Eclipse)
it DOES NOT work when run from the CLI (java -jar target\blade-app.jar)

To Reproduce

Run the attached package with java -jar.

app.zip

Screenshots

From CLI it doesn't work:
immagine

From Eclipse it works:

immagine

Additional context

I suspect everything is bound to the app.classpath.

Run with the IDE:

c.b.s.n.NettyServer : app.classpath    => C:/Users/a.ligios/git/blade/app/target/classes/

Run with java -jar:

c.b.s.n.NettyServer : app.classpath    => C:\Users\a.ligios\git\blade\app\target\blade-app.jar 
@hellokaton hellokaton self-assigned this Nov 29, 2018
hellokaton added a commit that referenced this issue Nov 30, 2018
@hellokaton
Copy link
Member

Please try this version2.0.12.RELEASE : )

@andrea-ligios
Copy link
Contributor Author

Nope 😞 :

immagine

It fixed #297 , though!

Now 2.0.12 works as 2.0.11 (and as every other previous version): yes on the IDE, nope on Windows CLI.

I'll let you know if it runs on Ubuntu ASAP, stay tuned

@hellokaton
Copy link
Member

Ok, I continue to pay attention to this issue. I have not reproduced it myself. I am letting other collaborators continue to try.

@andrea-ligios
Copy link
Contributor Author

I'll let you know if it runs on Ubuntu ASAP, stay tuned

It works perfectly fine on my Ubuntu... the problem is only on Windows then:

schermata da 2018-12-04 23-17-59

psh686868 added a commit to psh686868/blade that referenced this issue Dec 9, 2018
hellokaton added a commit that referenced this issue Dec 9, 2018
@hellokaton
Copy link
Member

@andrea-ligios The 2.0.13.ALPHA version of the Windows system works.

@andrea-ligios
Copy link
Contributor Author

Perfect! Thank you @biezhi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants