Weka脱离上下文

时间:2018-09-16 04:42:34

标签: c# machine-learning weka

我想在Visual Studio中使用weka。因此,我使用ikvmc -target:library weka.jar命令使用IKVM将weka.jar转换为weka.dll。转换成功,但是在命令提示符下,我从ikvm收到很多警告。

note IKVMC0002: Output file is "weka.dll"
warning IKVMC0100: Class "org.tukaani.xz.X86Options" not found
warning IKVMC0100: Class "org.tukaani.xz.FilterOptions" not found
warning IKVMC0100: Class "org.tukaani.xz.PowerPCOptions" not found
warning IKVMC0100: Class "org.tukaani.xz.IA64Options" not found
warning IKVMC0100: Class "org.tukaani.xz.ARMOptions" not found
warning IKVMC0100: Class "org.tukaani.xz.ARMThumbOptions" not found
warning IKVMC0100: Class "org.tukaani.xz.SPARCOptions" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.Coders$1.<init>()V"
    ("org.tukaani.xz.X86Options")
warning IKVMC0100: Class "org.tukaani.xz.FinishableWrapperOutputStream" not foun
d
warning IKVMC0100: Class "org.tukaani.xz.FinishableOutputStream" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.Coders$BCJDecoder.decode(Ljava.lang.String;Ljava.io.I
nputStream;JLorg.apache.commons.compress.archivers.sevenz.Coder;[B)Ljava.io.Inpu
tStream;"
    ("org.tukaani.xz.FilterOptions")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.Coders$BCJDecoder.encode(Ljava.io.OutputStream;Ljava.
lang.Object;)Ljava.io.OutputStream;"
    ("org.tukaani.xz.FinishableWrapperOutputStream")
warning IKVMC0100: Class "org.tukaani.xz.LZMAInputStream" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.Coders$LZMADecoder.decode(Ljava.lang.String;Ljava.io.
InputStream;JLorg.apache.commons.compress.archivers.sevenz.Coder;[B)Ljava.io.Inp
utStream;"
    ("org.tukaani.xz.LZMAInputStream")
warning IKVMC0100: Class "org.tukaani.xz.DeltaOptions" not found
warning IKVMC0100: Class "org.tukaani.xz.UnsupportedOptionsException" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.DeltaDecoder.decode(Ljava.lang.String;Ljava.io.InputS
tream;JLorg.apache.commons.compress.archivers.sevenz.Coder;[B)Ljava.io.InputStre
am;"
    ("org.tukaani.xz.DeltaOptions")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.DeltaDecoder.encode(Ljava.io.OutputStream;Ljava.lang.
Object;)Ljava.io.OutputStream;"
    ("org.tukaani.xz.DeltaOptions")
warning IKVMC0100: Class "org.tukaani.xz.LZMA2Options" not found
warning IKVMC0100: Class "org.tukaani.xz.LZMA2InputStream" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.LZMA2Decoder.<init>()V"
    ("org.tukaani.xz.LZMA2Options")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.LZMA2Decoder.decode(Ljava.lang.String;Ljava.io.InputS
tream;JLorg.apache.commons.compress.archivers.sevenz.Coder;[B)Ljava.io.InputStre
am;"
    ("org.tukaani.xz.LZMA2InputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.LZMA2Decoder.encode(Ljava.io.OutputStream;Ljava.lang.
Object;)Ljava.io.OutputStream;"
    ("org.tukaani.xz.FinishableWrapperOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.LZMA2Decoder.getDictSize(Ljava.lang.Object;)I"
    ("org.tukaani.xz.LZMA2Options")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.archivers.sevenz.LZMA2Decoder.getOptions(Ljava.lang.Object;)Lorg.tukaa
ni.xz.LZMA2Options;"
    ("org.tukaani.xz.LZMA2Options")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.lzma.LZMACompressorInputStream.<init>(Ljava.io.InputStream
;)V"
    ("org.tukaani.xz.LZMAInputStream")
warning IKVMC0100: Class "org.tukaani.xz.XZ" not found
warning IKVMC0100: Class "org.tukaani.xz.XZInputStream" not found
warning IKVMC0100: Class "org.tukaani.xz.SingleXZInputStream" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorInputStream.matches([BI)Z"
    ("org.tukaani.xz.XZ")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorInputStream.<init>(Ljava.io.InputStream;Z)V
"
    ("org.tukaani.xz.XZInputStream")
warning IKVMC0100: Class "org.tukaani.xz.XZOutputStream" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.<init>(Ljava.io.OutputStream;)
V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.<init>(Ljava.io.OutputStream;I
)V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.write(I)V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.write([BII)V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.flush()V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.finish()V"
    ("org.tukaani.xz.XZOutputStream")
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "org.apache.commons
.compress.compressors.xz.XZCompressorOutputStream.close()V"

我将weka.dll添加为Visual Studio项目中的参考,并尝试使用一些类。

但是我不断收到错误消息,例如“ weka.core”名称空间中不存在“类型或名称空间名称” Instance”(您是否缺少程序集或引用?)

这是我的示例示例代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using weka;
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            weka.core.Instance
        }
    }
}

0 个答案:

没有答案