Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Need help compiling java class files

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CLOSED: Need help compiling java class files

    Hi folks,
    I am completely new to Java so apologies in advance if I am stepping on toes here by asking the wrong thing.

    I found a gem of a scrabble game coded in Java but it dates way back to 2001! It is called Jabble and can be found here. Tne reason that I like it is that has aboout 90% of the features a scrabble game should have including anagram solver, board set up, skill level etc. It's actually very very good. Also, it's the only game I can play in work as my laptop is a coprporate vista laptop which is well restricted.

    Anyway, here is what I would like to do. I would to resize the screen on setup (without having to resizew all the time) and change a few colours to suit. So, I decompiled the files using a decompiler. I then made some changes but on compiling (using NetBeans) I got loads of errors, in fact too many to list here; I tried to fix them over 3 nights, but TBH I don't have a clue what I am doing I am getting nowhere I am guessing the errors are being caused because it is a really old java game and is not compatible with Java of today.

    I was hoping, fingers-crossed, that someone with expertise can help me compile the files so that I can make some the small adjustments above.

    Again, I am not sure if what I am asking for is too much, but hopefully someone can keep me right.

    Thanks for your time and interest.
    Last edited by peahead; February 11th, 2010 at 03:48 PM. Reason: POST CLOSED AS NOW POSTED ON CODE GURU


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Need help compiling java class files

    Problems such as this usually occur due to the lack of other jar/classes which the imported project depends upon. Just for fun, I quickly imported the Jabble source into my IDE and saw several errors pointing towards a missing library (org.apache...) which comes shipped with the project (log4j). Importing the library erased all errors.

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need help compiling java class files

    Hi Copeg,

    Thanks for your response - it sounds very interesting indeed - I would never have figured that out!

    Can you keep me right on what I am doing (I am so new to Java) as I wasn't able to remove the errors?

    I am using NetBeans IDE 6.8
    I downloaded log4j from here
    I booted NetBeans went to Tools / Libraries
    I created a new Library (Apache) and the ClassPath and Source to the log4j jar file (log4j-1.2.15)
    I went to Run / Clean and Build New Project and I still get a list of errors.

    Obviously I am not doing something right - I am not totally computer illiterate but again I am stuck. I was hoping if you could give me a run through of what exactly I should do - maybe emulate your setup?

    Thanks again

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need help compiling java class files

    I took the initiative and googled on how to import libraries into NetBeans...I used this page here. The Jabble project now debugs properly with no errors, however, when I go to Run / Clean and Build the build fails and reports 29 errors.
    Is it another case of where I am missing a library.
    Here is the error log.
    Can someone help me? Thanks

    Updating property file: C:\Users\User1\Desktop\Jabble.src\build\built-clean.properties
    Deleting directory C:\Users\User1\Desktop\Jabble.src\build
    clean:
    init:
    deps-jar:
    Created dir: C:\Users\User1\Desktop\Jabble.src\build
    Updating property file: C:\Users\User1\Desktop\Jabble.src\build\built-jar.properties
    Created dir: C:\Users\User1\Desktop\Jabble.src\build\classes
    Created dir: C:\Users\User1\Desktop\Jabble.src\build\empty
    Compiling 23 source files to C:\Users\User1\Desktop\Jabble.src\build\classes
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:48: not a statement
    AboutDialog.1 local1;
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:48: ';' expected
    AboutDialog.1 local1;
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:48: not a statement
    AboutDialog.1 local1;
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:49: '(' or '[' expected
    (local1 = new AboutDialog.1(tmp90_89)).setSize(300, 100);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:49: not a statement
    (local1 = new AboutDialog.1(tmp90_89)).setSize(300, 100);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:49: ';' expected
    (local1 = new AboutDialog.1(tmp90_89)).setSize(300, 100);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:49: not a statement
    (local1 = new AboutDialog.1(tmp90_89)).setSize(300, 100);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:49: ';' expected
    (local1 = new AboutDialog.1(tmp90_89)).setSize(300, 100);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Jabb le.java:263: ';' expected
    break label409:
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Rack .java:62: ';' expected
    break label38:
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Rack .java:63: ';' expected
    break label26:
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Row. java:255: ';' expected
    break label158:
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Row. java:323: ';' expected
    break label52:
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:109: <identifier> expected
    this.Label1.addMouseListener(new 1());
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:109: '(' or '[' expected
    this.Label1.addMouseListener(new 1());
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:109: ')' expected
    this.Label1.addMouseListener(new 1());
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:109: ';' expected
    this.Label1.addMouseListener(new 1());
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:109: illegal start of expression
    this.Label1.addMouseListener(new 1());
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: <identifier> expected
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: '(' or '[' expected
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: ')' expected
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: ';' expected
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: illegal start of expression
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:145: ';' expected
    this.mainPanel.addComponentListener(new 2(this));
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:160: <identifier> expected
    this.timer = new 3(this);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:160: '(' or '[' expected
    this.timer = new 3(this);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:160: ';' expected
    this.timer = new 3(this);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:160: not a statement
    this.timer = new 3(this);
    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Tool barFrame.java:160: ';' expected
    this.timer = new 3(this);
    29 errors

  5. #5
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Need help compiling java class files

    Be aware the OP has cross-posted this to other forums (e.g. CodeGuru).

  6. #6
    Member
    Join Date
    Feb 2010
    Location
    Dehradun, India
    Posts
    37
    Thanks
    1
    Thanked 7 Times in 6 Posts

    Default Re: Need help compiling java class files

    Hi have a look on your errors. There is a space in every class name like as:

    C:\Users\User1\Desktop\Jabble.src\JabbleFinal\Abou tDialog.java:48: not a statement
    AboutDialog.1 local1;

    It should be AboutDialog.java

    I think this is the only error.

Similar Threads

  1. [SOLVED] Web portal accessing files on the user's system via the Java I/O stream?
    By rendy.dev in forum Web Frameworks
    Replies: 2
    Last Post: January 18th, 2010, 08:46 PM
  2. Declaring variables in constructor and compiling
    By Newoor in forum Object Oriented Programming
    Replies: 3
    Last Post: December 5th, 2009, 01:07 PM
  3. Strange Compiling Error
    By crism85 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 13th, 2009, 12:59 AM
  4. merging two tables from two diffrent htmls files using java
    By sukant_at in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: September 1st, 2009, 05:13 AM
  5. merging two tables from two diffrent htmls files using java
    By sukant_at in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: August 7th, 2009, 12:48 PM

Tags for this Thread