Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 18th, 2002, 01:47 PM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
Java & MySQL

I know I got to d/l a driver (and I hev it )

I downloaded it from www.mysql.com
but I just kant figure it out how to install it....

I have to put a jar-file somewhere but I dont know why...


-----------------------------------------------------------------------------------

can you compile java into a *.exe? (or executable file unter llinux)
I use Borlands Jbuilder

thx in advance

Reply With Quote
  #2  
Old October 18th, 2002, 07:10 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
You have to put the .jar file into your classpath. Look at your help files, they'll tell you how to do that.

To execute a java program, you'd do something like:

java myClass

where myClass is a class file: "myClass.class".

Reply With Quote
  #3  
Old October 19th, 2002, 04:56 AM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
Either copy the "com" and "org" subdirectories and all of their contents
to anywhere you like, and put the directory holding the "com" and "org"
subdirectories in your classpath, or...

Put mysql-connector-j-2.0.14-bin.jar in your classpath, either by adding the
FULL path to it to your CLASSPATH enviornment variable, or putting it
in $JAVA_HOME/jre/lib/ext.


----> but what is the class_path???

-----------------------------------
The class path is used during compiling. This path is constructed from all of the following:
The output path
The class path for each library listed on the Paths page of the Project Properties dialog box (in the same order in which they are listed)
The target JDK version selected on the Paths page of the Project Properties dialog box

The complete class path is composed of these elements in this order: output path + library class paths (in the order libraries are listed in the Project Properties dialog box) + target JDK version

For example, the complete class path for Lion.class is: /<home>/<username>/jbproject/SampleProject/classes:
/user/jbuilder/lib/dbswing3.1.jar:/user/jdk1.3/bin
The class path is displayed on the Build tab after you compile.

------------------------------------
so this means that I have to install de driver seperatly for all applications? and the driver is compiled into the application itself?

I am a complete Java n00b

thanx in advance

Reply With Quote
  #4  
Old October 19th, 2002, 05:27 AM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
Found The Solution

coppied the mysql-connector-java-2.0.14-bin.jar -file into jbuilders

lib directory (youcan place it anywhere U like)

In Jbuilder
Tools> Enterprise Setup
select Database Drivers
Add...
->new...
unter Library paths click add.. and select the mysql-connector-java-2.0.14-bin.jar

and you're set

(you can use the database pilot to test it)

Reply With Quote
  #5  
Old October 19th, 2002, 01:34 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Ya, the class path is used both during compilation and during execution.

Basically, it's a list of locations to look for extra classes, like an include path in php or header files in C.

You can control the classpath each time you run the compiler or java executable, or you can set an environment variable with your own default classpath, or (like you found out) your ide has a few directories that are already in its own classpath.

Oh, and classpaths can contain more than one directory, so you're not limited to putting all your classes in the same place.

Reply With Quote
  #6  
Old October 21st, 2002, 10:12 AM
H@voc_!nc.'s Avatar
H@voc_!nc. H@voc_!nc. is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Belgium
Posts: 39 H@voc_!nc. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 48 sec
Reputation Power: 8
Send a message via ICQ to H@voc_!nc.
but where can you find it .... is it held in a environment variable, ini,jar..... whatever...

Reply With Quote
  #7  
Old October 21st, 2002, 12:32 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Often it's an environment variable, but it's also often passed to the java/javac executable as a command line parameter. To find what parameter is being passed, you'll have to look through the options/documentation for your IDE.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Java & MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway