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
Update bundles to also be JPMS modules for java versions 9 and above #14
Comments
PRs for that are welcome! |
I'm working on this, slowly. But I just wanted to call out here, before submitting a pull request, that doing this will require more work than simply moving files into a modular structure and adding the module-info files. Specifically, soundlibs currently uses The only reason soundlibs uses this JDK internal class is to calculate the number of elapsed microseconds since the JVM started. So, I'm going to have to make a change to the Source code for
My takeaway from this is that the Here is the implementation I'm contemplating: public class SunMiscPerfClock
implements JavaSequencer.Clock
{
private static final Instant start = Instant.now();
/** Retrieve system time in microseconds.
@return the system time in microseconds
*/
public long getMicroseconds()
{
Duration elapsed = Duration.between(start, Instant.now());
return TimeUnit.MICROSECONDS.convert(elapsed.toNanos(), TimeUnit.NANOSECONDS);
}
} The only testing I will be able to do, prior to submitting a pull request, will be to use the jar files I produce locally in a different application I am working on that uses the soundlibs to see if my application works appropriately with the new version of this library, with these changes in it. Please provide any feedback or suggestions if you have any. Thanks. |
Actually, I discovered the Perf class is still available in the java.base module in the jdk.internal package. So we don't need to make this change right now. But, I'm still curious what people think of this. Maybe we can test to see if this approach would work in order to remove the dependency on the jdk.internal implementation. |
I really cannot give much input here, my experience with JPMS is very limited. However I'd like to point out method |
I tried it today to make those jars modules. My observations: I'm now trying to package mp3spi,vorbisspi,jlayer,tritonus-share and jorbis as JPMS-modules in my repo jpms_sound |
Each artifact published to maven central, in addition to being valid OSGI bundles, should also be valid java modules. In other words, each bundle should also include a valid module-info.class.
The text was updated successfully, but these errors were encountered: