This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!

midhun raj

+ Follow
since Jun 04, 2011
Apples and Likes
Apples
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by midhun raj

I am using mysql as database and netbeans as IDE ..
I tried this small code to get database connectivity
[code=java
package database;

/**
*
* @author midhun
*/

import java.sql.*;

public class JDBCSAMPLE {

public static void main( String args[]) {

String connectionURL = "jdbc:mysql://localhost:3306/cmgmt";
// Change the connection string according to your db, ip, username and password

try {

// Load the Driver class.
Class.forName("com.mysql.jdbc.Drive");
// If you are using any other database then load the right driver here.

//Create the connection using the static getConnection method
Connection con = DriverManager.getConnection (connectionURL);

//Create a Statement class to execute the SQL statement
Statement stmt = con.createStatement();

//Execute the SQL statement and get the results in a Resultset
ResultSet rs = stmt.executeQuery("select * from regist;");

// Iterate through the ResultSet, displaying two values
// for each row using the getString method

while (rs.next())
System.out.println("Name= " + rs.getString("f_n") + " sex= " + rs.getString("sex")+"place="+rs.getString("place"));
}
catch (SQLException e) {
e.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}

}
}

][/code]

But i am getting the error when i run the fie error is

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
compile-single:
run-main:
java.lang.ClassNotFoundException: com.mysql.jdbc.Drive
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at database.JDBCSAMPLE.main(JDBCSAMPLE.java:25)
BUILD SUCCESSFUL (total time: 2 seconds)

Any guess how to solve this problem..
Thanks dude that explains it ..thanks
7 years ago
suppose i have



How to create an object of class B inside class D and call its methodB from class D...

Any help is appreciated
7 years ago
In java method overloading means functions with same function signature but different return type and differ in the amount of there argument...
I need questions like this for example...


Write a program on function overloading with aera() of cube,cuboid,sphere etc...

please share some more example questions of this sort
7 years ago
Could some one please give me about 15-20 practical questions on method overloading.I have to make my cousine the concept clear by making him do more sample practise problem.Any help would be highly appreciated
7 years ago
To design that .. what i need is just a demo program .. i need to work it only for my local host
Implement an SMTP server and client .Store the email in users inbox/outbox...


This was one of our university exam question..I am not much familiar with these types of programming please do help me .Thanks in advance,

When using return i am getting output like this...
But if its return works with catch then how come the rest of the main program gets executed to give this output..
Will not the program terminate at the return point..

Thanks for your help and support...
I am very much new to java program ..
8 years ago
To print the bytes in a file
...

i get the error...



if i modify this program...


it works fine what does return got to do inside catch.. please help me thanks in advance...
8 years ago
I have a servlet called newservlet.java
and a jsp called Uupdate.jsp

in newservlet.java


in Uupdate.jsp

I get the error...


but if i use Ulist in the places of Uattribute it works fine ... where am i going wrong

Thank you
in advance
8 years ago