evafauziah 6 роки тому
коміт
9f76a7db10

BIN
bin/com/fusi24/Tsting.class


+ 27 - 0
pom.xml

@@ -0,0 +1,27 @@
1
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
+  <modelVersion>4.0.0</modelVersion>
3
+  <groupId>javatrainig</groupId>
4
+  <artifactId>javatrainig</artifactId>
5
+  <version>0.0.1-SNAPSHOT</version>
6
+  <name>testingmaven</name>
7
+  <build>
8
+    <sourceDirectory>src</sourceDirectory>
9
+    <plugins>
10
+      <plugin>
11
+        <artifactId>maven-compiler-plugin</artifactId>
12
+        <version>3.7.0</version>
13
+        <configuration>
14
+          <source>1.8</source>
15
+          <target>1.8</target>
16
+        </configuration>
17
+      </plugin>
18
+    </plugins>
19
+  </build>
20
+  <dependencies>
21
+<dependency>
22
+    <groupId>mysql</groupId>
23
+    <artifactId>mysql-connector-java</artifactId>
24
+    <version>5.1.40</version>
25
+</dependency>
26
+</dependencies>
27
+</project>

+ 23 - 0
src/com/fusi24/Tsting.java

@@ -0,0 +1,23 @@
1
+package com.fusi24;
2
+
3
+import java.sql.Connection;
4
+import java.sql.DriverManager;
5
+import java.sql.SQLException;
6
+
7
+public class Tsting {
8
+
9
+	public static void main(String[] args) {
10
+		System.out.println("Hello Word");
11
+	
12
+		   String url = "jdbc:mysql://db.fusi24.com:3306/employees";
13
+				  String username = "training";
14
+				  String password = "training";
15
+				  System.out.println("connecting database...");
16
+		   try (Connection connection = DriverManager.getConnection(url, username, password)) {
17
+			    System.out.println("Database connected!");
18
+			} catch (SQLException e) {
19
+			    throw new IllegalStateException("Cannot connect the database!", e);
20
+			}
21
+	}
22
+
23
+}

+ 5 - 0
target/classes/META-INF/MANIFEST.MF

@@ -0,0 +1,5 @@
1
+Manifest-Version: 1.0
2
+Built-By: fusi-Aldi
3
+Build-Jdk: 1.8.0_121
4
+Created-By: Maven Integration for Eclipse
5
+

+ 7 - 0
target/classes/META-INF/maven/javatrainig/javatrainig/pom.properties

@@ -0,0 +1,7 @@
1
+#Generated by Maven Integration for Eclipse
2
+#Tue Jun 26 17:25:48 ICT 2018
3
+version=0.0.1-SNAPSHOT
4
+groupId=javatrainig
5
+m2e.projectName=javatrainig
6
+m2e.projectLocation=C\:\\Users\\fusi-Aldi\\Documents\\workspace-sts-3.9.4.RELEASE\\javatrainig
7
+artifactId=javatrainig

+ 27 - 0
target/classes/META-INF/maven/javatrainig/javatrainig/pom.xml

@@ -0,0 +1,27 @@
1
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
+  <modelVersion>4.0.0</modelVersion>
3
+  <groupId>javatrainig</groupId>
4
+  <artifactId>javatrainig</artifactId>
5
+  <version>0.0.1-SNAPSHOT</version>
6
+  <name>testingmaven</name>
7
+  <build>
8
+    <sourceDirectory>src</sourceDirectory>
9
+    <plugins>
10
+      <plugin>
11
+        <artifactId>maven-compiler-plugin</artifactId>
12
+        <version>3.7.0</version>
13
+        <configuration>
14
+          <source>1.8</source>
15
+          <target>1.8</target>
16
+        </configuration>
17
+      </plugin>
18
+    </plugins>
19
+  </build>
20
+  <dependencies>
21
+<dependency>
22
+    <groupId>mysql</groupId>
23
+    <artifactId>mysql-connector-java</artifactId>
24
+    <version>5.1.40</version>
25
+</dependency>
26
+</dependencies>
27
+</project>

BIN
target/classes/com/fusi24/Tsting.class