Skip to content

Commit 66b38b3

Browse files
committed
files
0 parents  commit 66b38b3

File tree

8 files changed

+73
-0
lines changed

8 files changed

+73
-0
lines changed

.classpath

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
5+
<attributes>
6+
<attribute name="module" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="lib" path="/var/www/java/javaTutorial/jedis-1.5.2.jar"/>
10+
<classpathentry kind="lib" path="/var/www/java/javaTutorial/mysql-connector.jar"/>
11+
<classpathentry kind="output" path="bin"/>
12+
</classpath>

.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>javaTutorial</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>

bin/kevinRedis/Basic.class

517 Bytes
Binary file not shown.

bin/kevinRedis/mysqlBasic.class

1.81 KB
Binary file not shown.

jedis-1.5.2.jar

104 KB
Binary file not shown.

mysql-connector.jar

528 KB
Binary file not shown.

src/kevinRedis/Basic.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package kevinRedis;
2+
3+
import redis.clients.jedis;
4+
5+
public class Basic {
6+
7+
public static void main(String[] args) {
8+
9+
System.out.println("data");
10+
11+
Jedis jedis = new Jedis("localhost");
12+
jedis.set("foo", "bar");
13+
String value = jedis.get("foo");
14+
System.out.println("datatwo");
15+
}
16+
}

src/kevinRedis/mysqlBasic.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package kevinRedis;
2+
3+
import java.sql.*;
4+
5+
public class mysqlBasic {
6+
7+
public static void main(String[] args) {
8+
// TODO Auto-generated method stub
9+
System.out.println("mysql start");
10+
11+
try {
12+
Class.forName("com.mysql.jdbc.Driver");
13+
Connection con=DriverManager.getConnection(
14+
"jdbc:mysql://localhost:3306/robo2_1228","root","1");
15+
16+
Statement stmt=con.createStatement();
17+
ResultSet rs=stmt.executeQuery("select * from users");
18+
while(rs.next())
19+
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
20+
con.close();
21+
} catch(Exception e) {
22+
System.out.println(e);
23+
}
24+
25+
System.out.println("mysql end");
26+
}
27+
28+
}

0 commit comments

Comments
 (0)