Sticking a JAVA class in a library

Discussion in 'Mac Programming' started by Eraserhead, Jan 19, 2006.

  1. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #1
    Hey, I'm not sure if I'm asking the right question, but basically I have some java class files (from my University - specifically one called MaInput.class) I would like to be able to access this class file (and possibly some others) from any java .class file I run on my Mac, is this possible? It seems to be on the UNIX machines...
     
  2. macrumors 68020

    Joined:
    Jul 4, 2002
    Location:
    Muncie, Indiana
    #2
    They will run fine, just ftp them over. Open a terminal window and execute them with the java command, e.g. java foo
     
  3. macrumors 6502

    Joined:
    May 12, 2003
    #3
  4. thread starter macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    Thanks, thats probably the easiest thing to do...
     
  5. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #5
    jar them first:
    Code:
    jar cfv yourclasses.jar <list of class files or directory>
    before ftping them over. Then you'll just need to reference the jar file in your classpath.
     

Share This Page