Ran into trouble with JEP-458 -- Launch Multi-File Source-Code Programs
David Alayachew
davidalayachew at gmail.com
Wed Jan 29 20:25:46 UTC 2025
Hello Compiler Dev Team,
I have been using JEP 458 to great effect, but I ran into an issue today. I
made a StackOverflow post about it.
https://stackoverflow.com/questions/79398053/why-cant-i-use-the-same-class-path-for-my-compile-command-versus-my-run-command
Long story short, it appears that all my source files must be contained
under a single root. This differs in behaviour from javac, which permits as
many root folders as you want, as long as all of them are listed in your
class path option.
Is there any chance that we could add this functionality in?
Long story short, I found that JEP 458 is actually great for testing
pre-existing classes. Classes that are nested deep in a pre-existing
hierarchy, and therefore, may sometimes be within different root
hierarchies. Being able to have both of these source files on the class
path greatly facilitates testing because I can isolate the individual files
I need, and test the functionality simply by adding a main method to one
of the classes.
This ended up being super super super useful to me until I finally landed
on an example that has 2 different roots, as I found out in the SO post.
Would it make sense to add the ability to have multiple roots?
Thank you for your time and consideration.
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20250129/518e6e25/attachment.htm>
More information about the compiler-dev
mailing list