error from building [javac] Compiling 4 source files to /home/longta/workspace/SPANphex/output/classes [javac] ---------- [javac] 1. ERROR in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java (at line 56) [javac] import sun.swing.UIAction; [javac] ^^^^^^^^^ [javac] The import sun.swing cannot be resolved [javac] ---------- [javac] 2. WARNING in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java (at line 67) [javac] public class JXTree extends JTree { [javac] ^^^^^^ [javac] The serializable class JXTree does not declare a static final serialVersionUID field of type long [javac] ---------- [javac] 3. WARNING in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java [javac] (at line 70) [javac] private final static Class[] methodSignature = new Class[] {Object.class}; [javac] ^^^^^ [javac] Class is a raw type. References to generic type Class<T> should be parameterized [javac] ---------- [javac] 4. WARNING in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java (at line 125) [javac] public JXTree(Vector value) { [javac] ^^^^^^ [javac] Vector is a raw type. References to generic type Vector<T> should be parameterized [javac] ---------- [javac] 5. WARNING in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java (at line 141) [javac] public JXTree(Hashtable value) { [javac] ^^^^^^^^^ [javac] Hashtable is a raw type. References to generic type Hashtable<K,V> should be parameterized [javac] ---------- [javac] 6. ERROR in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java [javac] (at line 261) [javac] map.put("expand-all", new Actions("expand-all")); [javac] ^^^ [javac] The method put(Object, Action) in the type ActionMap is not applicable for the arguments (String, JXTree.Actions) [javac] ---------- [javac] 7. ERROR in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java (at line 262) [javac] map.put("collapse-all", new Actions("collapse-all")); [javac] ^^^ [javac] The method put(Object, Action) in the type ActionMap is not applicable for the arguments (String, JXTree.Actions) [javac] ---------- [javac] 8. ERROR in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java [javac] (at line 304) [javac] private class Actions extends UIAction { [javac] ^^^^^^^^ [javac] UIAction cannot be resolved to a type [javac] ---------- [javac] 9. ERROR in /home/longta/workspace/SPANphex/src/main/java/org/jdesktop/swingx/JXTree.java [javac] (at line 306) [javac] super(name); [javac] ^^^^^^^^^^^^ [javac] The constructor Object(String) is undefined [javac] ---------- I built it on a linux of ubuntu. What should I do for it? |
|
thank you for your reply it was done. Thank you |
Now I need to convert the ant build.xml to an eclipse project. Anyone knows how to convert it? Because it is hard to use texteditor rather than eclipse IDE to code. Manually or the other ways all ok. |
Go to New -> Project... and select "Java Project" don't select "..from existing Ant file"!! Give it a name and select "Create project from existing source" and select the Phex root folder. Now click on "Next" On the source tab configure two source folders one is "src\main\java" and the other is "src\test\java", most likely eclipse will detect them for you already. If you like to use ant in eclipse set the output dir to "output/classes", see below. On the library tab all Jar files from "thridparty\**" should be listed. Click "Finish" and your eclipse project should be available. You can build Phex during development using the eclipse integrated build method, which is what I do most of the time. Or use the Phex ant build.xml from eclipse inside the build directory (Context menu - Run As..). In case you use the build.xml you should set the eclipse output folder to the "output/classes" directory. This is where the build.xml will write the classes too. In case you use eclipse build using the same output directory wont hurt either. |
Hi, thank you so much. your words are so helpful. Now I know why the source tab configure is "src/main/java" and "src/test/java" not "src". Otherwise I have to manually modify package name over five hundreds. Anyway thank you so much. |
It works well. I am so pleased. Now I am trying the inside ant |
an error will arise Hi, gregork PhexEventService.publish is not defined in PhexEventServiceIml. So an error will arise when you fill an ip address for the local host in firwall/proxy option. |
I think there must be a different reason for this error... Could it be that if you have compile errors you are missing the java files and if you have runtime errors you are missing the class files from org.bushe.swing.event.* in your source/classpath? |
I have checked already. Do you think whether there is another reason? |
the version of 3.2.0.102 does not have the problem, but the version 3.2.0.103 does. |
I found it Hi, gregork: I resolved it. I think it invokes the method too earlier than servent is loaded or made successfully. Consequently, setForcedHostIp method is invoked too early to get a Servent instance. I am not sure when the Servent instance sets up. |
Hi, gregork: I understood it in total. Servent has a object of Server that must create a LocalHostAddress object or instance that is going to call setForedHostIp, but the setForedHostIp needs a static servent instance. However this instance of Servent isn't set up yet because of the front reason. Recursion enters a dead cycle. |
Great catch, thank you!! I tried to fix the problem in SVN. Can you verify if it works for you? BTW: there is actually not really a reason to set a forced IP. Phex is pretty good at detecting your public IP once you are connected to the network. There are only very few special cases where it makes sense to set the forced IP. |
public Server() { hasConnectedIncomming = ConnectionPrefs.HasConnectedIncomming.get().boolea nValue(); lastInConnectionTime = -1; isRunning = false; /** localAddress = new LocalServentAddress( this ); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } */ } public Server() { hasConnectedIncomming = ConnectionPrefs.HasConnectedIncomming.get().boolea nValue(); lastInConnectionTime = -1; isRunning = false; /** localAddress = new LocalServentAddress( this ); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } */ } private void setupLocalAddress() { localAddress =new LocalServentAddress(this); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } } public synchronized void startup() throws IOException { setupLocalAddress(); if (isRunning) { return; } NLogger.debug( Server.class, "Starting listener"); isRunning = true; firewallCheckTimer = new FirewallCheckTimer(); Environment.getInstance().scheduleTimerTask( firewallCheckTimer, FirewallCheckTimer.TIMER_PERIOD, FirewallCheckTimer.TIMER_PERIOD ); bind( NetworkPrefs.ListeningPort.get().intValue() ); // localAddress = new LocalServentAddress( this ); ThreadPool.getInstance().addJob(this, "IncommingListener-" + Integer.toHexString(hashCode())); } private void setupLocalAddress() { localAddress =new LocalServentAddress(this); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } } public synchronized void startup() throws IOException { setupLocalAddress(); if (isRunning) { return; } NLogger.debug( Server.class, "Starting listener"); isRunning = true; firewallCheckTimer = new FirewallCheckTimer(); public Server() { hasConnectedIncomming = ConnectionPrefs.HasConnectedIncomming.get().boolea nValue(); lastInConnectionTime = -1; isRunning = false; /** localAddress = new LocalServentAddress( this ); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } */ } private void setupLocalAddress() { localAddress =new LocalServentAddress(this); if ( ProxyPrefs.ForcedIp.get().length() > 0) { IpAddress ip = new IpAddress( AddressUtils.parseIP( ProxyPrefs.ForcedIp.get() ) ); localAddress.setForcedHostIP( ip ); } } public synchronized void startup() throws IOException { setupLocalAddress(); if (isRunning) { return; } NLogger.debug( Server.class, "Starting listener"); isRunning = true; firewallCheckTimer = new FirewallCheckTimer(); Environment.getInstance().scheduleTimerTask( firewallCheckTimer, FirewallCheckTimer.TIMER_PERIOD, FirewallCheckTimer.TIMER_PERIOD ); bind( NetworkPrefs.ListeningPort.get().intValue() ); // localAddress = new LocalServentAddress( this ); ThreadPool.getInstance().addJob(this, "IncommingListener-" + Integer.toHexString(hashCode())); } Environment.getInstance().scheduleTimerTask( firewallCheckTimer, FirewallCheckTimer.TIMER_PERIOD, FirewallCheckTimer.TIMER_PERIOD ); bind( NetworkPrefs.ListeningPort.get().intValue() ); // localAddress = new LocalServentAddress( this ); ThreadPool.getInstance().addJob(this, "IncommingListener-" + Integer.toHexString(hashCode())); } I was just moving the setupLocalAddress method into startup. Actually, your phex is very good and helpful to me. I was a c++ programmer before and new of java programming. So I should say "thank you" to you. |
Yes moving the method into startup would work too. I liked get ride of the Servent.getInstance() calls. They are just a workaround to keep the code running while I was doing a lot restructuring over the last weeks. Thats why I was handing the objects instances through in my solution. But both things should work... If you like Phex you are also very welcome to help out with coding. So if you like to work on anything or you have some improvements just tell me. |
Yes, I like to do coding things. I try to learn your phex gui part, it is so overwhelming to me. I don't know how you code it. for example treetable has too many technical details. I don't know what they do. |
gregork: I am trying to understand them at my best. If you give me some kind of roadmap to learn them, I will be grateful for that. Anyway, thanks beforehand. |
Actually I don't know the details how TreeTable works myself. I just added the class from the SwingX project https://swingx.dev.java.net/ if I remember correct and used the functionality. As a roadmap I would just suggest you to think of something easy to improve on the GUI. There are a few things on the Wishlist in the Wiki http://www.phex.org/wiki/index.php/Wishlist or in the Phex Bug Tracker, like this one: SourceForge.net: Detail: 1810708 - clicking enter in result monitor should start passive search I can also assign you one which should be good to start with. As the next step I would suggest to start from the corresponding tab or dialog class to check where to integrate it. Most GUI part is not so difficult like the tables. Most code in Phex uses JGoodies Forms to layout the components. So I would suggest you get familiar with it. But you can also use standard JDK LayoutManagers when you design a whole new panel and you feel more familiar with it. So instead of trying to understand the whole GUI, which is just not possible in short time I would suggest you to start just with the parts where you want to change things. If you feel unsure where to look you can just ask or send me code to review I can help you get back on track. Gregor |
Hi, gregork: I am so glad to join you. I have understood some kinds of layouts, and after reading the program, I feel it similar with JDK LayoutManagers. That is not so hard. |
Hi, gregork: my email address: longercrawler ya..oo.ca |
Keep in touch |
HI, grepork: I have a question for you. I tried phex search engine. However I find that the search results are not as much as Limewire did and not faster than Limewire run even I took out the hostile table. Whether limewire blocks some phex ip addresses? the amount of limewire clients is huge over phex after all. If there exist aspects to improve, I think, accelerating the search engine may be vital for gaining clients. |
All times are GMT -7. The time now is 08:02 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2020 Gnutella Forums.
All Rights Reserved.