Lluvian Brown

Greenhorn
+ Follow
since Apr 16, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lluvian Brown

Ubuntu Linux:
Add External Jar File Works ONLY Solution I found

Mac OSX Yosemite:
Copy paste jar file in WEB-INF/lib folder ONLY Solution I found

Both solution do not work for me on the reversed on either systems but I got it working and can keep learning.

FYI - I have not tried adding the jar file to Tomcat and if that is best practice I will try it. Thank you all for your assistance!!!
What makes this even confusing is I did the exact same steps in Ubuntu and it works!

I just need to figure out what is wrong in OSX because that is my development environment.
Sorry about the confusion. This is a basic Java EE web project with MariaDB as the backend database. I am trying to connect to MariaDB within Eclipse. I did select to add the mariadb jdbc driver using the build path configuration options. In the Library tab I selected to add external jar. I can see my jar there in the project and navigate to the Driver.class file. I also restart Tomcat7. What I am not sure of it there was another step I had to take. I even tried adding the jar file to Web-INF/lib folder and that did not work.
This was the step I used:

The next step I did was add my MariaDB project to my build path.
1. Right click project.
2. Build Path -> Configure Build Path
3. Select Libraries and Add External JAR's
4. Clicked OK.

Is adding it to the runtime path different from that step? If so, I did not add it and will need to look into how to accomplish that.
Hello Everyone!

I need some assistance connecting my Eclipse application to my MariaDB web project.

System:
Mac OS Yosemite
Java 8
Eclipse EE Juno
MariaDB

I have a database that I manually created in MariaDB using MySQL Workbench called webshop.

The next step I did was add my MariaDB project to my build path.
1. Right click project.
2. Build Path -> Configure Build Path
3. Select Libraries and Add External JAR's
4. Clicked OK.

Now I added it to my code.

and


In my catch area below Class.forName for driver I have an exception that says cant load database driver. This is how I know my driver can not be found.

What did I do wrong and what will I need to resolve this issue?
When comparing strings your do want to use the dogString.equals(myString) in your if statement. Also, I do not like that else in that question. The reason is because if I type something other than yes by accident then your user does not have a chance to correct their answer. You can use an else/if for the "no" comparison and then an else that can break loop; to the beginning of the question until the user answers correctly. Another solution would be a while loop that will not exit until the user answers correctly.

If you are just practicing, I would create two programs. One with the if statement and the other with the switch.

-Thanks for your question and post. Please let us know how it works out for you!
10 years ago
Thanks for everything guys!

Just in case someone needs help with this here is an example:

10 years ago
I figured it out thanks.

I am coming from another language and I am not familiar with the built in methods. I have not used Java since my first programming course in college.
10 years ago
Hi all,

I want to know if there is a way to cut out a string in Java. Lets say I have three string below:

Test string number, test this out, hi: My name is John, test this out here
Another test string, testing this out for me, hi: My name is Frank, done here testing
Last test string, testing cut strings, hi: My name is Jeff, last test done

I want the ability to search for the key words "hi:" and when I find it I need to cut out hi: and everything until the first ",". My program that I am experimenting with will be done if I am able to complete this task.

This helps we with certain log files that I search through.

-Thanks
10 years ago