Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 19, 2006, 02:10 PM   #1
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Sticking a JAVA class in a library

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...
Eraserhead is online now   0 Reply With Quote
Old Jan 19, 2006, 02:38 PM   #2
cubist
macrumors 68020
 
Join Date: Jul 2002
Location: Muncie, Indiana
Send a message via AIM to cubist
They will run fine, just ftp them over. Open a terminal window and execute them with the java command, e.g. java foo
cubist is offline   0 Reply With Quote
Old Jan 19, 2006, 02:44 PM   #3
therevolution
macrumors 6502
 
Join Date: May 2003
Add the files to your classpath. More info here.
therevolution is offline   0 Reply With Quote
Old Jan 19, 2006, 02:50 PM   #4
Eraserhead
Thread Starter
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Quote:
Originally Posted by cubist
They will run fine, just ftp them over. Open a terminal window and execute them with the java command, e.g. java foo
Thanks, thats probably the easiest thing to do...
Eraserhead is online now   0 Reply With Quote
Old Jan 19, 2006, 02:51 PM   #5
plinden
macrumors 68040
 
plinden's Avatar
 
Join Date: Apr 2004
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.
plinden is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
The Java class file "xxx.class" could not be launched. piratemacfan Mac Applications and Mac App Store 1 Aug 31, 2013 03:24 PM
The Java class file "PopSampleApplet.class" could not be launched. piratemacfan OS X 10.8 Mountain Lion 0 Aug 30, 2013 03:03 PM
Referencing a child class in a parent class, good or bad? SAIRUS iPhone/iPad Programming 11 Aug 28, 2013 11:59 AM
Chrome on OS X -- Java plugin / Java 7 vs Java 6 Issue booyahbooyah Mac Applications and Mac App Store 4 May 31, 2013 09:13 AM
Difference between Public class and private class. zijianz iPhone/iPad Programming 4 Jun 29, 2012 09:29 PM

Forum Jump

All times are GMT -5. The time now is 03:09 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC