0
我正在處理的項目由幾個組件組成 - 幾個獨立的庫被編譯爲JAR,以及一個引用它們的主項目。所有的都是用Scala編寫的。
我在其中一個庫內部使用ChronicleMap,使用具有自己的編組器的自定義值類。 當運行的主要項目中,我得到這些錯誤:
/net/openhft/chronicle/core/values/ByteValue$$Native.java:15: error: cannot find symbol
public class ByteValue$$Native implements ByteValue, Copyable<ByteValue>, BytesMarshallable, Byteable {
^
symbol: class ByteValue
/net/openhft/chronicle/core/values/ByteValue$$Native.java:15: error: cannot find symbol
public class ByteValue$$Native implements ByteValue, Copyable<ByteValue>, BytesMarshallable, Byteable {
^
symbol: class ByteValue
/net/openhft/chronicle/core/values/ByteValue$$Native.java:39: error: cannot find symbol
public void copyFrom(ByteValue from) {
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Native
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:12: error: cannot find symbol
public class ByteValue$$Heap implements ByteValue, Copyable<ByteValue>, BytesMarshallable {
^
symbol: class ByteValue
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:12: error: cannot find symbol
public class ByteValue$$Heap implements ByteValue, Copyable<ByteValue>, BytesMarshallable {
^
symbol: class ByteValue
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:34: error: cannot find symbol
public void copyFrom(ByteValue from) {
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Heap
/net/openhft/chronicle/core/values/ByteValue$$Native.java:20: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Native.java:25: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Native.java:30: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Native.java:65: error: cannot find symbol
if (!(obj instanceof ByteValue)) return false;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Native
/net/openhft/chronicle/core/values/ByteValue$$Native.java:66: error: cannot find symbol
ByteValue other = (ByteValue) obj;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Native
/net/openhft/chronicle/core/values/ByteValue$$Native.java:66: error: cannot find symbol
ByteValue other = (ByteValue) obj;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Native
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:15: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:21: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:26: error: method does not override or implement a method from a supertype
@Override
^
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:57: error: cannot find symbol
if (!(obj instanceof ByteValue)) return false;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Heap
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:58: error: cannot find symbol
ByteValue other = (ByteValue) obj;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Heap
/net/openhft/chronicle/core/values/ByteValue$$Heap.java:58: error: cannot find symbol
ByteValue other = (ByteValue) obj;
^
symbol: class ByteValue
location: class net.openhft.chronicle.core.values.ByteValue$$Heap
這隻能從IntelliJ IDEA的運行項目的時候,沒有在命令行中運行時發生。另外,如果我設置了一個獨立的項目,它使用相同的自定義類和編組器的相同ChronicleMap,我從IDE運行它時沒有任何問題。只有在運行使用IDE中的庫的項目時纔會出現此問題。
所以我想這可能會或可能不會與類加載順序,也可能是IDE中缺少的一些依賴關係。
有什麼我可以做,找出爲什麼我不能從IDE運行?