Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Java Help!

  • 03-01-2006 04:40PM
    #1
    Registered Users, Registered Users 2 Posts: 9,228 ✭✭✭


    hey,

    I'm trying to compile a project that was dwritten by somebody else, using their build file in ant, when i run it though i am gettgin 77 errors and beside one or two errors they all relate to vectors, treemaps, linked lists and hashmaps,

    every error is either
    [javadoc] /Users/../Documents/DeNIS/src/ie/tcd/cs/nds/linehane/timeseries/TimeSeries.java:748: <identifier> expected
    [javadoc] public java.util.Vector<String> getFieldNames () {

    or
    [javadoc] /Users/.../Documents/DeNIS/src/ie/tcd/cs/nds/linehane/plugins/tcp/TCPMessages.java:27: '(' or '[' expected
    [javadoc] msgs = new LinkedList<TCPMessage>();

    or finally
    [javadoc] /Users/.../Documents/DeNIS/src/ie/tcd/cs/nds/linehane/plugins/tcp/TCPConnectionSet.java:23: '(' or '[' expected
    [javadoc] connections = new HashMap<Integer, TCPConnection>(5000);

    each time it is pointing to the < as the error, why are these used, should they be used and how can i fix it. this program should compile but i am compiling it on my mac, when it was written for linux, but this surely shouldnt make a difference??

    anyone have any ideas? any help would be greatly appreciated!! thanks a lot


Comments

  • Registered Users, Registered Users 2 Posts: 4,127 ✭✭✭deadl0ck


    Are you compiling it with the correct version of Java ?

    That looks like Java Tempaltes wich is fairly recent.


  • Registered Users, Registered Users 2 Posts: 9,228 ✭✭✭Chardee MacDennis


    J2SE 1.4.2 comes preinstalled on tiger, whats the newest version?


  • Closed Accounts Posts: 324 ✭✭madramor


    Call_me_al wrote:
    J2SE 1.4.2 comes preinstalled on tiger, whats the newest version?

    You need java version 1.5 also called Tiger, it is the first version to use generics the stuff that is giving you the error.


  • Registered Users, Registered Users 2 Posts: 9,228 ✭✭✭Chardee MacDennis


    found it in tiger but how do i make terminal use this to compile instead of 1.4.2?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Make what terminal?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,228 ✭✭✭Chardee MacDennis


    terminal is the mac equivalent of cmd except its unix instead of dos


  • Registered Users, Registered Users 2 Posts: 19,396 ✭✭✭✭Karoma


    http://docs.info.apple.com/article.html?artnum=301073
    Once you set it there (Reboot if necessary) it should work system-wide.


Advertisement