Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-01-2008, 07:11 PM
JDCAce's Avatar
Member
 
Join Date: Oct 2008
Location: Columbus, GA, US
Posts: 29
JDCAce is on a distinguished road
Send a message via AIM to JDCAce Send a message via MSN to JDCAce Send a message via Yahoo to JDCAce Send a message via Skype™ to JDCAce
Making A Set Of Classes "Importable"
My class uses a set of classes written by guys at Georgia Tech; these classes are, for instance, used for pictures, sounds, and even one for a little turtle you can "drive" around the window to make him draw something.

Now, I'm not sure if these classes are copyrighted or not (I can check that later), but I would like to make these classes available to all programs I want, not just programs placed in a specific folder. How would I do this? Would I add an import statement at the beginning? What would I tell the program to import, the files' directory? Would I need to alter the classes I want to import to make them importable?

If you don't want to explain the process, then at least tell me what this process is called. I've heard the term generalization (but I don't know what it is); is what I want to do called generalization?
__________________
"Things are made of littler things that jiggle."
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-02-2008, 03:01 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 880
Nicholas Jordan is on a distinguished road
classpath
This is what classpath is all about. There is also a folder called extensions where tools like this can be found, but they are not included in the build and have to be included somehow if the tool is to be used in distribution:
Code:
C:\Program Files\Java\jdk1.6.0\jre\lib\ext\sunjce_provider.jar
for example allows me to do testing and learning on a jar file from Sun.

I still do not know how to use classpath correctly, I gave up on it - somehow there should be a way to place third party libs in distributions....

some little place to put them....
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-02-2008, 11:13 PM
Senior Member
 
Join Date: Sep 2008
Posts: 317
Darryl.Burke is on a distinguished road
No, it's not generalization, and I haven't heard that term used in the context of Java... are you sure you don't mean 'Generics'?

As Nicholas has said, you need to learn about setting the classpath. If you're using any IDE (Eclipse? NetBeans?) there is a setting for the compile time and run time classpath.

Never used Eclipse myself, but NetBeans builds a lib folder in the dist folder and creates a ReadMe.txt file with adequate instructions for deploying the application.

Here's a link that will give you plenty of tutorial matter to read through, all of it useful even if not directly applicable to your present problem.
Sun Microsystems - Search

db
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-02-2008, 11:16 PM
JDCAce's Avatar
Member
 
Join Date: Oct 2008
Location: Columbus, GA, US
Posts: 29
JDCAce is on a distinguished road
Send a message via AIM to JDCAce Send a message via MSN to JDCAce Send a message via Yahoo to JDCAce Send a message via Skype™ to JDCAce
Ah, thanks, you two. Yes, the term was generics, and I learned what that meant yesterday. I shall now learn about classpaths!
__________________
"Things are made of littler things that jiggle."
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-05-2008, 11:11 AM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 880
Nicholas Jordan is on a distinguished road
Runs a little different depending on what OS you are using. If it is one of the Unice ( eg Linux or System5 ) then env_vars or something is an array of name=value pairs the each '~' can have in some '/'

For winnie, we may set the ${CLASSPATH} in Control Panel / ( sorry but I try to avoid backslashing ) / System / Envionment Variables

Better (IMO) to use command line syntax to spec classpath for each invocation of either compiler or jvm, gets sorta messy trying to disentangle all the places to put things. Java will map between '.' and a directory in a remarkably eager fashion. I saw something on a very advanced site where some folks do not use classpath due to unpredictable nature of parsing on differing platforms.

I will write a hundred line program to demonstrate some simple concept for an intermediate, but do not use package statments in my own code due to the convoluted nature of getting things located.

If you use NetBeans, it will figure it out for you.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java, Military Format using "/" and "%" Operator!! sk8rsam77 New To Java 4 11-06-2008 06:09 AM
the dollar sign "$", prints like any other normal char in java like "a" or "*" ? lse123 New To Java 1 10-20-2008 09:35 AM
<core:forEach var="" begin="+<%=j%>+">??? freddieMaize JavaServer Pages (JSP) and JSTL 1 09-27-2008 03:20 AM
"Jumble" or "Scramble" Program Shadow22202 Java Applets 8 04-30-2008 05:42 AM
Hwlp with "Open", "Save", "Save as..." trill New To Java 1 07-31-2007 09:53 AM


All times are GMT +3. The time now is 09:07 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org