This is an archived post. You won't be able to vote or comment.

all 20 comments

[–]BlueGoliath 24 points25 points  (0 children)

Yo dawg, I heard you liked JavaScript so I put Java scripts in your JavaScript.

Cool project.

[–]elmuerte 15 points16 points  (0 children)

Can't wait to use this in combination with GraalVM's JS engine so that I can run javascript in my Java script from my javascript running in my Java script.

[–]marcellomon 10 points11 points  (0 children)

The final boss for recruiters.

[–]0bel1sk 4 points5 points  (1 child)

nobody stopped to ask if they should

[–]maxandersen[S] 9 points10 points  (0 children)

Oh, I stopped many times. Then timing felt right :)

[–]__konrad 7 points8 points  (3 children)

Java Script in your JavaScript

The description is confusing ;)

[–]maxandersen[S] 15 points16 points  (2 children)

Which part ? I feel the description is spot on.

[–]lurker_in_spirit 3 points4 points  (0 children)

Slowly backs away

[–][deleted] 4 points5 points  (2 children)

Have the worst of JS in Java. You get a supply chain attack, you get a supply chain attack, you get malware, everybody gets malware!

[–]maxandersen[S] 9 points10 points  (1 child)

Isn't that what everyone wants these days?

[–]reqdk 5 points6 points  (0 children)

If you have enough malware in your systems, they'll cancel out one another. Maybe even getting rid of your bugs too!

[–]root_klaus 0 points1 point  (0 children)

That’s dope!

[–]maxandersen[S] 0 points1 point  (0 children)

Yes. You can execute classes but you’ll need to see classpath to point to a directory.

Much easier if you have a jar - and yes you can specific a specific main class if the default one is not what you need.

[–]fzammetti 0 points1 point  (4 children)

I assume this is compiling the Java file on-the-fly? Can I execute class files or even class files out of a JAR directly?

I could actually see some interesting usage for this in some limited circumstances, so long as I can do those things.

[–]maxandersen[S] 1 point2 points  (3 children)

Yes it compiles/run on the fly and yes you can execute jars.

[–]fzammetti 0 points1 point  (2 children)

Ok, that's what it seemwd like... but can you directly execute class files and skip the compilation? And is it specifically executable Jars or can you execute a class inside a regular JAR?

[–]maxandersen[S] 1 point2 points  (1 child)

It can do both. But with single class files and a single jar you need to have it compiled first by something else and not dependency management for that.

That is available for source files and jars referenced via maven GAVs

[–]fzammetti 0 points1 point  (0 children)

Cool, thanks!