Need help compiling a Java-based Google Code project

Discussion in 'Mac Programming' started by chowyunskinny, Aug 23, 2008.

  1. macrumors newbie

    Joined:
    Aug 23, 2008
    #1
    I am trying to figure out how to compile the source code for a Java-based Google Code project, but I am not familiar with XCode or Java, so I am not getting very far. I downloaded the code and now have the lib, resource, and src folders inside of a folder I have on the desktop.

    So far I have tried the following:

    1) Launched XCode and selected File, then New Project... and chose Java Application

    2) Added the files to their respective places in the project (lib files in lib, src files in src, etc.)

    3) Clicked Build and Go

    The first time I tried this process, it came up with some errors related to the version in the build.xml file, which I was able to fix. When I clicked Build and Go again, it ran fine, but it only returned the sample Java Application.

    Could someone direct me in how to properly compile the source code with XCode?

    The source code is located at http://code.google.com/p/groupwise-exporter/
     
  2. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    From what I got from SVN there seemed to be no documentation at all. From the folder the checkout created, i ran:
    Code:
    javac -cp "`ls ./lib | awk '{printf("./lib/"$1 ":")}'`" src/org/galbraiths/[gu]*/*.java
    To get all of the classes built. I have no idea how i'm supposed to run it. I guess you need a configuration file? Once it compiled I sort of gave up on it.

    I'm not sure about setting this up existing java projects in XCode.

    -Lee

    P.S. I looked more at the project, SVN logs, etc. and it looks pretty dead. It has been over a year since it was worked on, etc. At least it compiled, I suppose. From the google code pages I could find no further documentation on how to configure the darn(I would use stronger language, but this forum has a profanity filter..) thing, etc.
     
  3. thread starter macrumors newbie

    Joined:
    Aug 23, 2008
    #3
    Thanks for the effort, I really appreciate it. I went ahead and sent the author an email in hopes that he can explain how to build his application. If he replies and I get it to work, I'll post a reply.
     
  4. macrumors newbie

    Joined:
    Nov 17, 2008
    #4
    I wanted to change the hard coded timezone so I wanted to do something similar.

    I rarely reply to things like this but I was having the same exact problem (and was beating my head against the desk for a while trying to figure this out since I am a Java newb). I got it working so I had to share.

    - Download Eclipse 4.3.1.
    - Create a new project in eclipse
    - Copy src, resources and lib directories into new project folder
    - Edit project properties -> Java Build Path (right click on project in Package
    Explorer)
    - Add JARS... : Add all the jar files in lib directory
    - Add Class Folder... : Add resource directory

    Click Run As.. in menu bar
    - Select Java Application
    - Select SwingUI as the Main class

    You can also create a standalone app from this.

    Export as OSX App
    - In menubar Click File->Export->Other->Mac OSX Application Bundle
    - Select the Main Class: SwingUI
    - JVM Version: 1.5+
    - Icon: Find an icon you like (I used the one in the downloaded app)

    - Click Finish.

    Run the app wherever you put it.

    Hope that helps...


    --
    Bill
     

Share This Page