fly9i / finalspeed

高速双边加速软件,在高丢包,延迟环境下仍可达到90%物理带宽利用率.
http://www.ip4a.com/c/131.html
GNU General Public License v2.0
26 stars 7 forks source link

openwrt 使用jamvm无法运行 #2

Open sdu-hen6e opened 8 years ago

sdu-hen6e commented 8 years ago

jamvm版本信息: root@OpenWrt:/# jamvm -version java version "1.5.0" JamVM version 2.0.0 Copyright (C) 2003-2014 Robert Lougher rob@jamvm.org.uk

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Build information:

Execution Engine: direct-threaded interpreter with stack-caching Compiled with: gcc 4.8.3

Boot Library Path: /usr/lib/classpath Boot Class Path: /usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip

运行返回结果如下: root@OpenWrt:/# jamvm -jar /usr/share/finalspeed.jar -b java.lang.reflect.InvocationTargetException at java.lang.reflect.VMMethod.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:327) at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50) Caused by: java.lang.NoClassDefFoundError: net/fs/client/ClientUI at net.fs.client.FSClient.main(FSClient.java:26) at java.lang.reflect.VMMethod.invoke(Native Method) ...2 more Caused by: java.lang.NoClassDefFoundError: net/fs/client/ClientUII at java.lang.VMClassLoader.defineClass(Native Method) at java.lang.VMClassLoader.defineClassWithTransformers(VMClassLoader.java:343) at java.lang.ClassLoader.defineClass(ClassLoader.java:471) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:83) at java.net.URLClassLoader.findClass(URLClassLoader.java:617) at java.lang.ClassLoader.loadClass(ClassLoader.java:341) at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112) at java.lang.ClassLoader.loadClass(ClassLoader.java:293) at net.fs.client.FSClient.main(FSClient.java:26) ...3 more Caused by: java.lang.OutOfMemoryError at java.util.zip.OutputWindow.(OutputWindow.java:54) at java.util.zip.Inflater.(Inflater.java:183) at java.util.zip.ZipFile.getInputStream(ZipFile.java:455) at java.util.jar.JarFile.getInputStream(JarFile.java:454) at gnu.java.net.loader.JarURLResource.getInputStream(JarURLResource.java:63) at java.net.URLClassLoader.findClass(URLClassLoader.java:538) at java.lang.ClassLoader.loadClass(ClassLoader.java:341) at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112) at java.lang.ClassLoader.loadClass(ClassLoader.java:293) at java.lang.VMClassLoader.defineClass(Native Method) ...11 more

sdu-hen6e commented 8 years ago

我的路由器cpu 1.2ghz,ram 512m,openwrt 15.05

duffercn commented 8 years ago

和你遇到的问题一样

tofuliang commented 8 years ago

一开始忘记放配置文件,报这个错

# jamvm -jar finalspeed.jar -b
System: linux 2.6.36.4brcmarm
java.io.FileNotFoundException: client_config.json
   at java.io.FileInputStream.<init>(FileInputStream.java:121)
   at net.fs.client.ClientUI.readFileUtf8(ClientUI.java:403)
   at net.fs.client.ClientUI.loadConfig(ClientUI.java:364)
   at net.fs.client.ClientUI.<init>(ClientUI.java:115)
   at net.fs.client.FSClient.main(FSClient.java:26)
   at java.lang.reflect.VMMethod.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:327)
   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.io.IOException: No such file or directory
   at gnu.java.nio.VMChannel.open(Native Method)
   at gnu.java.nio.VMChannel.openFile(VMChannel.java:529)
   at gnu.java.nio.FileChannelImpl.<init>(FileChannelImpl.java:151)
   at gnu.java.nio.FileChannelImpl.create(FileChannelImpl.java:141)
   at java.io.FileInputStream.<init>(FileInputStream.java:113)
   ...7 more
java.io.FileNotFoundException: client_config.json
   at java.io.FileInputStream.<init>(FileInputStream.java:121)
   at net.fs.client.ClientUI.readFileUtf8(ClientUI.java:403)
   at net.fs.client.ClientUI.loadConfig(ClientUI.java:364)
   at net.fs.client.ClientUI.<init>(ClientUI.java:115)
   at net.fs.client.FSClient.main(FSClient.java:26)
   at java.lang.reflect.VMMethod.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:327)
   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.io.IOException: No such file or directory
   at gnu.java.nio.VMChannel.open(Native Method)
   at gnu.java.nio.VMChannel.openFile(VMChannel.java:529)
   at gnu.java.nio.FileChannelImpl.<init>(FileChannelImpl.java:151)
   at gnu.java.nio.FileChannelImpl.create(FileChannelImpl.java:141)
   at java.io.FileInputStream.<init>(FileInputStream.java:113)
   ...7 more
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.VMMethod.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:327)
   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.lang.NullPointerException
   at net.fs.client.ClientUI.<init>(ClientUI.java:118)
   at net.fs.client.FSClient.main(FSClient.java:26)
   at java.lang.reflect.VMMethod.invoke(Native Method)
   ...2 more

满心欢喜的以为可以在tomato(EA6500V2)上用 谁知道加上配置文件后就报错

# jamvm -jar finalspeed.jar -b
System: linux 2.6.36.4brcmarm
Illegal instruction
# jamvm -version
java version "1.5.0"
JamVM version 2.0.0
Copyright (C) 2003-2014 Robert Lougher <rob@jamvm.org.uk>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2,
or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Build information:

Execution Engine: direct-threaded interpreter with stack-caching
Compiled with: gcc 4.8.5

Boot Library Path: /opt/lib/classpath
Boot Class Path: /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip
xidian-sq commented 8 years ago

不要挣扎了,fs基于jdk 1.6开发,jamvm只能支持到1.5,想移植不是简单除去awt和swing这么简单的。。。

coolwill commented 8 years ago

岂止java版本这一个问题?还有libpcap版本、jna版本等问题等着你。 不要挣扎了,跟我一样装个chroot版debian系统,然后后面就好办了。

luckbyq commented 6 years ago

请问怎么加载配置文件?我是在linux系统上去运行的。配置文件放在同级目录也无法加载。

luckbyq commented 6 years ago

[root@bb test]# ll total 4964 -rw-r--r-- 1 root root 176 May 17 19:04 client_config.json -rw-r--r-- 1 root root 2583347 May 17 17:40 finalspeed1.1.1.jar -rw-r--r-- 1 root root 2488181 May 17 17:36 finalspeed.jar -rw-r--r-- 1 root root 140 May 17 18:01 port_map.json

{ "download_speed": 11200698, "protocal": "udp", "server_address": "这里已经填写了IP地址。", "server_port": 150, "socks5_port": 1083, "upload_speed": 357469 }

[root@bb test]# java -jar finalspeed.jar -b System: linux 3.10.0-514.el7.x86_64 Network Interface List: virbr0 docker0 docker_gwbridge veth0b781bc Bluetooth adapter number 0 bluetooth0 vetha1a6c41 USB bus number 1 usbmon1 USB bus number 2 usbmon2 veth03e766a enp4s0 veth5d2fd18 vethabb4721 veth87443e0 br-f1971745edea Pseudo-device that captures on all interfaces any lo Selected Network Interface: enp4s0 发送第一次握手 ident 5153 [Ethernet Header (14 bytes)] Destination address: 48:7d:2e:3c:76:c3 Source address: c8:5b:76:b2:2e:3a Type: 0x0800 (IPv4) [IPv4 Header (20 bytes)] Version: 4 (IPv4) IHL: 5 (20 [bytes]) TOS: [precedence: 0 (Routine)] [tos: 0 (Default)] [mbz: 0] Total length: 52 [bytes] Identification: 5153 Flags: (Reserved, Don't Fragment, More Fragment) = (false, true, false) Fragment offset: 0 (0 [bytes]) TTL: 64 Protocol: 6 (TCP) Header checksum: 0xe61b Source address: /192.168.0.222 Destination address: /127.0.0.1

java.lang.Exception: 创建隧道失败! at net.fs.cap.CapEnv.createTcpTun_Client(CapEnv.java:465) at net.fs.cap.VDatagramSocket.tryConnectTun_Client(VDatagramSocket.java:84) at net.fs.cap.VDatagramSocket.send(VDatagramSocket.java:53) at net.fs.rudp.Route.sendPacket(Route.java:272) at net.fs.rudp.ClientControl.sendPacket(ClientControl.java:125) at net.fs.rudp.Sender.sendPacket(Sender.java:299) at net.fs.rudp.Sender.send(Sender.java:295) at net.fs.rudp.Sender.sendDataMessage(Sender.java:184)