Java 9 sun.boot.class.path gone

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 9 sun.boot.class.path gone

Mario Ivankovits
Hi!

In latest Java 9 builds the „sun.boot.class.path“ is gone. Due to this, the core java classes can no longer be found by aspectj.
On AspectJs earlyJava9 branch I’ve patched it like this to make that work again.


Index: weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java
===================================================================
--- weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java    (revision f8b86ff2c03a77e47e87573b59bc43c57cfdee38)
+++ weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java    (revision )
@@ -38,6 +38,7 @@

 import org.aspectj.bridge.IMessageHandler;
 import org.aspectj.bridge.MessageUtil;
+import org.aspectj.util.LangUtil;
 import org.aspectj.weaver.BCException;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.WeaverMessages;
@@ -70,6 +71,11 @@
                if (trace.isTraceEnabled())
                        trace.enter("<init>", this, new Object[] { classpath, handler });
                entries = new ArrayList<Entry>();
+
+               if (LangUtil.is19VMOrGreater()) {
+                       entries.add(new JImageEntry(null));
+               }
+
                for (Iterator<String> i = classpath.iterator(); i.hasNext();) {
                        String name = i.next();
                        addPath(name, handler);

Regards,
Mario

_______________________________________________
aspectj-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 sun.boot.class.path gone

Andy Clement
I thought the fix for this was already in (a variant of it) - I was doing some work on 1.9.0 BETA4 recently. This included picking up all the latest Eclipse JDT support for Java9 and coping with the changes to paths. But I will admit I was working with a 121 build version of Java9, perhaps things have changed again since then. I’ll have a look when I get a moment.

cheers,
Andy
 
On Jul 22, 2016, at 11:31 AM, Mario Ivankovits <[hidden email]> wrote:

Hi!

In latest Java 9 builds the „sun.boot.class.path“ is gone. Due to this, the core java classes can no longer be found by aspectj.
On AspectJs earlyJava9 branch I’ve patched it like this to make that work again.


Index: weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java
===================================================================
--- weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java    (revision f8b86ff2c03a77e47e87573b59bc43c57cfdee38)
+++ weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java    (revision )
@@ -38,6 +38,7 @@

 import org.aspectj.bridge.IMessageHandler;
 import org.aspectj.bridge.MessageUtil;
+import org.aspectj.util.LangUtil;
 import org.aspectj.weaver.BCException;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.WeaverMessages;
@@ -70,6 +71,11 @@
                if (trace.isTraceEnabled())
                        trace.enter("<init>", this, new Object[] { classpath, handler });
                entries = new ArrayList<Entry>();
+
+               if (LangUtil.is19VMOrGreater()) {
+                       entries.add(new JImageEntry(null));
+               }
+
                for (Iterator<String> i = classpath.iterator(); i.hasNext();) {
                        String name = i.next();
                        addPath(name, handler);

Regards,
Mario
_______________________________________________
aspectj-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users