-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some of the warnings about varargs means that it is imprecise about
what method should get called.

"As an API designer, you should use them sparingly, only when the
benefit is truly compelling. Generally speaking, you should not
overload a varargs method, or it will be difficult for programmers to
figure out which overloading gets
called."(http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.ht
ml)

did you hear that, developers? vararg methods should NOT be
overloaded. I think you can safely ignore them. Maybe you can
convince some of the developers to get rid of them from 0.7.

As for the symbols not found, it means that you are missing some
jars. download
http://freenetproject.org/snapshots/freenet-contrib-latest.src.tar.bz2
and put them in your CLASSPATH.

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQIVAwUBQy4aj7pm/UYt98nlAQLPIQ//Qr6yi1Zlnjk9wSKygMPkkvSZ5WJ8chYH
7PymvxmOdMKWdLt1vjsKKw2OYie0BySpAIrejPQH4gJP5+ZnjXoNeOm3ysgFLXAg
QXZxGietX4fsvQwNc9GwgJDs89XPrbTAi2jJl95tEFBP/Tlc4MteSzuiTb+pSZRc
cD6gOSX4vyk8cxLmqKN5ioMdaVoUCvX+z0mqZLsnbGNVJkfMzMwcoq3RsZLSsg8E
1dij4QcCBNT+LtxSoWx7sVb+bqiFaZfD+TVuNLZFoTkJg42SDlQc/Jb5LbVLMK9W
Uj19Hf43vpPVYf+NBylcSTng3pLnzzp3BjyvqrkK/FwZnzTLM5DVQ2mZcn47s/u0
qOO7bE6reTJlRMVyKql4pgtyMf8sgbeZH/qfwEU8+WRMxYJyHwRKplDiXw1M4SVG
MIlnaPYJPIUnATuw4oAxNERB2cUJHtYXVGA8OjfvsfYpWqIXzxKIXrXjh2nr3TY/
MWc8HJ2AnwpLWssyoz207u+iR0RAgH74ksJXINGHMiIJIwMwsGyCcLxvR8ZTsfok
mm1csg3DpggGCRjeCLDBy4EabHzxA/y0RprbAddzc/SIWgwL66ushzqkha2KcalC
kDGPdoNjozIq0CLtsL9N/ohAQFYALi6FbtfsVfiNrmqTMeXEhYNcIyVXH9OwXCvN
tI4sY32yJtY=
=LCH6
-----END PGP SIGNATURE-----



>From: Juiceman <juiceman69 at gmail.com>
>Reply-To: juiceman69 at gmail.com,Discussion of development issues 
><devl at freenetproject.org>
>To: Discussion of development issues <devl at freenetproject.org>
>Subject: Re: [freenet-dev] Compiling with Sun 1.5
>Date: Sun, 18 Sep 2005 14:09:59 -0400
>
>On 9/18/05, Yongqian Li <yongqli at hotmail.com> wrote:
> > Java 5 is very diffrent from previous versions (4, 3, 2) etc., so you 
>cannot
> > compile the code for previous JREs. If some of the warnings look like
> >
> > Note: [java file].java uses unchecked or unsafe operations.
> > Note: Recompile with -Xlint:unchecked for details.
> >
> > you can safely ignore it. It's a new protective feature added in Java 5 
>that
> > programmers can take advantage of to write safer code (specifically it 
>can
> > help get rid of ClassCastExceptions from using the Collections 
>framework).
> > As for the warnings, did you put the jar files that Freenet requires 
>into
> > the CLASSPATH? (try C:\Program Files\Java\jdk1.5.0_04\lib ) As for the
> > smaller jar size, the Java 5 compiler add new optimizations to the 
>bytecode,
> > making it smaller. I have noticed this with my own programs, so it is
> > normal.
> >
> > I hope I have been helpful.
>
>Thanks for answering so quickly!  I hope my newbie coder questions
>aren't too retarded.  This is what I get with the default build.bat
>
>Building Freenet Java implementation (Fred)
>Building the Freenet node and servlets...
>javac: target release 1.1 conflicts with default source release 1.5
>Built node and servlets
>Building Freenet command-line client...
>javac: target release 1.1 conflicts with default source release 1.5
>Built command-line client.
>Building FProxy...
>javac: target release 1.1 conflicts with default source release 1.5
>Built FProxy
>Copying Templates
>Building Tools...
>javac: target release 1.1 conflicts with default source release 1.5
>Built Tools
>Creating freenet.jar...
>Done
>
>The jar didn't build (well, it did but it only 124KB).  If I change
>the target to 1.5 I get:
>
>Building Freenet Java implementation (Fred)
>Building the Freenet node and servlets...
>src\freenet\node\NodeConfigUpdater.java:117: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Class for a varargs call
>cast to java.lang.Class[] for a non-varargs call and to suppress this 
>warning
>                                                 null).invoke(
>                                                 ^
>src\freenet\node\NodeConfigUpdater.java:119: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Object for a varargs call
>cast to java.lang.Object[] for a non-varargs call and to suppress this 
>warning
>                                                 null);
>                                                 ^
>Note: * uses or overrides a deprecated API.
>Note: Recompile with -Xlint:deprecation for details.
>Note: Some input files use unchecked or unsafe operations.
>Note: Recompile with -Xlint:unchecked for details.
>2 warnings
>Built node and servlets
>Building Freenet command-line client...
>src\freenet\client\FreenetURITest.java:5: package junit.framework does not 
>exis
>
>import junit.framework.TestCase;
>                        ^
>src\freenet\client\FreenetURITest.java:10: cannot find symbol
>symbol: class TestCase
>public class FreenetURITest extends TestCase {
>                                     ^
>src\freenet\client\FreenetURITest.java:13: package junit.textui does not 
>exist
>                 junit.textui.TestRunner.run(FreenetURITest.class);
>                             ^
>src\freenet\client\FreenetURITest.java:30: cannot find symbol
>symbol  : method assertTrue(java.lang.String,boolean)
>location: class freenet.client.FreenetURITest
>                                 assertTrue("Error parsing freenet URI", 
>false);
>                                 ^
>src\freenet\node\NodeConfigUpdater.java:117: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Class for a varargs call
>cast to java.lang.Class[] for a non-varargs call and to suppress this 
>warning
>                                                 null).invoke(
>                                                 ^
>src\freenet\node\NodeConfigUpdater.java:119: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Object for a varargs call
>cast to java.lang.Object[] for a non-varargs call and to suppress this 
>warning
>                                                 null);
>                                                 ^
>Note: * uses or overrides a deprecated API.
>Note: Recompile with -Xlint:deprecation for details.
>Note: Some input files use unchecked or unsafe operations.
>Note: Recompile with -Xlint:unchecked for details.
>4 errors
>2 warnings
>Built command-line client.
>Building FProxy...
>src\freenet\node\NodeConfigUpdater.java:117: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Class for a varargs call
>cast to java.lang.Class[] for a non-varargs call and to suppress this 
>warning
>                                                 null).invoke(
>                                                 ^
>src\freenet\node\NodeConfigUpdater.java:119: warning: non-varargs call of 
>varar
>s method with inexact argument type for last parameter;
>cast to java.lang.Object for a varargs call
>cast to java.lang.Object[] for a non-varargs call and to suppress this 
>warning
>                                                 null);
>                                                 ^
>Note: * uses or overrides a deprecated API.
>Note: Recompile with -Xlint:deprecation for details.
>Note: Some input files use unchecked or unsafe operations.
>Note: Recompile with -Xlint:unchecked for details.
>2 warnings
>Built FProxy
>Copying Templates
>Building Tools...
>error: cannot read: src\freenet\fs\dir\FSConsole.java
>1 error
>Built Tools
>Creating freenet.jar...
>Done
>
>The jar builds to 2110KB which is much closer to normal.  I don't like
>the looks of the "cannot find symbol" errors and FSConsole.java didn't
>build at all...
>
>Thanks in advance for any insight you may have.
>_______________________________________________
>Devl mailing list
>Devl at freenetproject.org
>http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl



Reply via email to