Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   Adapting Phex (private networks) (https://www.gnutellaforums.com/adapting-phex-private-networks/)
-   -   error from building (https://www.gnutellaforums.com/adapting-phex-private-networks/84673-error-building.html)

uchelong May 27th, 2008 01:38 PM

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?

GregorK May 28th, 2008 10:55 AM

Use Sun Java

https://help.ubuntu.com/community/Java

uchelong May 29th, 2008 08:37 AM

thank you for your reply
 
it was done. Thank you

uchelong May 29th, 2008 08:43 AM

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.

GregorK May 29th, 2008 09:52 AM

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.

uchelong May 29th, 2008 11:57 AM

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.

uchelong May 29th, 2008 12:01 PM

It works well. I am so pleased. Now I am trying the inside ant

uchelong May 30th, 2008 06:58 AM

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.

GregorK May 30th, 2008 07:26 AM

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?

uchelong May 30th, 2008 09:35 AM

I have checked already.
 
Do you think whether there is another reason?


All times are GMT -7. The time now is 12:04 PM.

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.