Skip to content

Commit

Permalink
CHanged properties paths for jars
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitij1234 committed Apr 20, 2017
1 parent 68b691c commit c20bdd0
Show file tree
Hide file tree
Showing 54 changed files with 61 additions and 23 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
<classpathentry kind="lib" path="lib/syntheticaBlackStar.jar"/>
<classpathentry kind="lib" path="lib/syntheticaBlueLight.jar"/>
<classpathentry kind="lib" path="lib/weblaf-complete-1.29.jar"/>
<classpathentry kind="lib" path="Files"/>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 3 additions & 0 deletions Files/Files/SSHinfo.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ip=172.16.26.9
username=kshitij.cs15
password=kshitij#456
3 changes: 3 additions & 0 deletions Files/Files/details.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dbName=jdbc:mysql://mysql4.gear.host/sql12168820
user=kshitij
password=autodockis##
Binary file added Files/Files/scholar.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions SSHinfo.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ip=172.16.26.9
username=kshitij.cs15
password=kshitij#456
1 change: 1 addition & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/main/
/test/
Binary file modified bin/main/admin/admindao/AdminDAO.class
Binary file not shown.
Binary file modified bin/main/admin/adminpaneldao/AdminPanelDAO.class
Binary file not shown.
Binary file modified bin/main/admin/studentdbhandler/StudentDbHandler.class
Binary file not shown.
Binary file modified bin/main/course/coursedao/CourseDAO.class
Binary file not shown.
Binary file modified bin/main/course/coursedao/CourseMappingDAO.class
Binary file not shown.
Binary file modified bin/main/professor/professorDAO/ProfessorDAO.class
Binary file not shown.
Binary file modified bin/main/professor/professorframe/UploadedAssignments.class
Binary file not shown.
Binary file not shown.
Binary file modified bin/main/student/studentdao/StudentDAO.class
Binary file not shown.
Binary file modified bin/main/util/CSVfiles/CSVfiles.class
Binary file not shown.
Binary file modified bin/main/util/codetester/FileOutputMatcher.class
Binary file not shown.
Binary file modified bin/main/util/download/Download.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$1.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$2.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$3.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$4.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$5.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$6.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$7.class
Binary file not shown.
Binary file modified bin/main/util/home/Home$8.class
Binary file not shown.
Binary file modified bin/main/util/home/Home.class
Binary file not shown.
Binary file modified bin/main/util/home/SplashScreen$1$1.class
Binary file not shown.
Binary file modified bin/main/util/home/SplashScreen$1.class
Binary file not shown.
Binary file modified bin/main/util/home/SplashScreen.class
Binary file not shown.
Binary file modified bin/main/util/sshcommands/SSHComm.class
Binary file not shown.
Binary file modified bin/main/util/sshcommands/SSHCommands.class
Binary file not shown.
Binary file modified bin/main/util/sshcommands/UsingJsch.class
Binary file not shown.
Binary file modified bin/main/util/upload/Upload.class
Binary file not shown.
Binary file added bin/splash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions details.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dbName=jdbc:mysql://mysql4.gear.host/sql12168820
user=kshitij
password=autodockis##
4 changes: 3 additions & 1 deletion src/main/admin/admindao/AdminDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import main.admin.admin.Admin;
import main.student.student.Student;
import main.student.studentdao.StudentDAO;

import org.jasypt.util.password.StrongPasswordEncryptor;

public class AdminDAO {
Expand All @@ -29,7 +31,7 @@ public AdminDAO()throws Exception {
/*
* Change File Location in the Properties File. This is only a test/temp.location
*/
prop.load(new FileInputStream("Files//details.properties"));
prop.load(AdminDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
3 changes: 2 additions & 1 deletion src/main/admin/adminpaneldao/AdminPanelDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.sql.ResultSet;

import main.admin.admin.Admin;
import main.student.studentdao.StudentDAO;

public class AdminPanelDAO {

Expand All @@ -32,7 +33,7 @@ public AdminPanelDAO()throws Exception {
/*
* Change File Location in the Properties File. This is only a test/temp.location
*/
prop.load(new FileInputStream("Files//details.properties"));
prop.load(AdminPanelDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
4 changes: 3 additions & 1 deletion src/main/admin/studentdbhandler/StudentDbHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import java.util.List;
import java.util.Properties;
import main.student.student.*;
import main.student.studentdao.StudentDAO;

import org.jasypt.util.password.StrongPasswordEncryptor;

public class StudentDbHandler {
Expand All @@ -28,7 +30,7 @@ public class StudentDbHandler {

public StudentDbHandler() throws IOException {
Properties prop=new Properties();
prop.load(new FileInputStream("Files//details.properties"));
prop.load(StudentDbHandler.class.getResourceAsStream("/details.properties"));
dbName=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
3 changes: 2 additions & 1 deletion src/main/course/coursedao/CourseDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import main.course.course.Course;
import main.student.student.Student;
import main.student.studentdao.StudentDAO;

public class CourseDAO {

Expand All @@ -30,7 +31,7 @@ public CourseDAO()throws Exception {
/*
* Change File Location in the Properties File. This is only a test/temp.location
*/
prop.load(new FileInputStream("Files//details.properties"));
prop.load(CourseDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
3 changes: 2 additions & 1 deletion src/main/course/coursedao/CourseMappingDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Properties;

import main.student.student.Student;
import main.student.studentdao.StudentDAO;

public class CourseMappingDAO {

Expand All @@ -25,7 +26,7 @@ public CourseMappingDAO()throws Exception {
/*
* Change File Location in the Properties File. This is only a test/temp.location
*/
prop.load(new FileInputStream("Files//details.properties"));
prop.load(CourseMappingDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
3 changes: 2 additions & 1 deletion src/main/professor/professorDAO/ProfessorDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.jasypt.util.password.StrongPasswordEncryptor;

import main.professor.professor.Professor;
import main.student.studentdao.StudentDAO;

public class ProfessorDAO {

Expand All @@ -31,7 +32,7 @@ public class ProfessorDAO {
public ProfessorDAO()throws Exception{

Properties prop=new Properties();
prop.load(new FileInputStream("Files//details.properties"));
prop.load(ProfessorDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.mysql.jdbc.PreparedStatement;

import main.student.student.Student;
import main.student.studentdao.StudentDAO;

public class StudentCourseOutlineDAO {

Expand All @@ -20,7 +21,7 @@ public class StudentCourseOutlineDAO {

public StudentCourseOutlineDAO(Student student)throws Exception{
Properties properties = new Properties();
properties.load(new FileInputStream("Files//details.properties"));
properties.load(StudentCourseOutlineDAO.class.getResourceAsStream("/details.properties"));
String dbname=properties.getProperty("dbName");
String user=properties.getProperty("user");
String password=properties.getProperty("password");
Expand Down
2 changes: 1 addition & 1 deletion src/main/student/studentdao/StudentDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public StudentDAO()throws Exception {
/*
* Change File Location in the Properties File. This is only a test/temp.location
*/
prop.load(new FileInputStream("Files//details.properties"));
prop.load(StudentDAO.class.getResourceAsStream("/details.properties"));
dbname=prop.getProperty("dbName");
user=prop.getProperty("user");
password=prop.getProperty("password");
Expand Down
3 changes: 2 additions & 1 deletion src/main/util/CSVfiles/CSVfiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpException;

import main.student.studentdao.StudentDAO;
import main.util.assignmentutils.assignment.Assignment;
import main.util.filedetails.FileDetails;
import main.util.sshcommands.UsingJsch;
Expand Down Expand Up @@ -64,7 +65,7 @@ public static ArrayList<Assignment> ReadMarksFile(String path) throws Exception{

Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(CSVfiles.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
3 changes: 2 additions & 1 deletion src/main/util/codetester/FileOutputMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;

import main.student.studentdao.StudentDAO;
import main.util.filedetails.FileDetails;
import main.util.sshcommands.UsingJsch;

Expand All @@ -40,7 +41,7 @@ public FileOutputMatcher(String out,String check,int m){
this.m = m;
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(FileOutputMatcher.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
3 changes: 2 additions & 1 deletion src/main/util/download/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.jcraft.jsch.Session;

import main.student.coursepanel.CourseAssignmentPanel;
import main.student.studentdao.StudentDAO;
import main.util.assignmentutils.assignment.Assignment;

public class Download {
Expand All @@ -28,7 +29,7 @@ public Download()
{
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(Download.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
6 changes: 4 additions & 2 deletions src/main/util/home/Home.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.awt.FlowLayout;
import java.awt.Font;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;
Expand All @@ -58,8 +59,9 @@ public class Home extends JFrame {

/**
* Launch the application.
* @throws IOException
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {

SplashScreen sc=new SplashScreen();
/*
Expand Down Expand Up @@ -97,7 +99,7 @@ public void run() {
*/
public Home() throws Exception {
setTitle("Course Management System");
setIconImage(ImageIO.read(new File("iitp.png")));
//setIconImage(ImageIO.read(new File("iitp.png")));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(500, 200, 530, 377);
contentPane = new JPanel();
Expand Down
13 changes: 9 additions & 4 deletions src/main/util/home/SplashScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import java.awt.Font;
import java.awt.HeadlessException;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.*;

import de.javasoft.plaf.synthetica.SyntheticaBlueLightLookAndFeel;
Expand All @@ -17,7 +21,7 @@ public class SplashScreen extends JWindow {
private static int count;
private static Timer timer1;

public SplashScreen() {
public SplashScreen() throws IOException {
execute =this;
Container container = getContentPane();
container.setLayout(null);
Expand All @@ -29,8 +33,9 @@ public SplashScreen() {
panel.setLayout(null);
panel.setBackground(new Color(156,213,242));
// container.add(panel);

JLabel label = new JLabel("",new ImageIcon("splash.jpg"),SwingConstants.CENTER);
BufferedImage image = ImageIO.read(getClass().getResource("/splash.jpg"));
ImageIcon icon = new ImageIcon(image);
JLabel label = new JLabel("",icon,SwingConstants.CENTER);
label.setFont(new Font("Comic Sans MS",Font.BOLD,19));

label.setBounds(0, 0, 640, 400);
Expand Down Expand Up @@ -99,7 +104,7 @@ public void run() {
timer1.start();
}

public static void main(String[] args) {
public static void main(String[] args)throws Exception {
execute = new SplashScreen();
}
};
3 changes: 2 additions & 1 deletion src/main/util/sshcommands/SSHComm.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.StreamGobbler;
import main.student.studentdao.StudentDAO;

public class SSHComm {
private static Connection conn=null;
Expand All @@ -18,7 +19,7 @@ public SSHComm() throws IOException
{
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(SSHComm.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
3 changes: 2 additions & 1 deletion src/main/util/sshcommands/SSHCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.IOException;
import java.util.Properties;

import main.student.studentdao.StudentDAO;
import net.neoremind.sshxcute.core.ConnBean;
import net.neoremind.sshxcute.core.IOptionName;
import net.neoremind.sshxcute.core.Result;
Expand All @@ -30,7 +31,7 @@ public SSHCommands()

Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(SSHCommands.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
8 changes: 5 additions & 3 deletions src/main/util/sshcommands/UsingJsch.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import com.jcraft.jsch.SftpException;
import com.jcraft.jsch.UserInfo;

import main.student.studentdao.StudentDAO;


public class UsingJsch {

Expand Down Expand Up @@ -64,7 +66,7 @@ public static void writingFile(String dir,String text,String file,int mode) thro
session = null;
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(UsingJsch.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down Expand Up @@ -114,7 +116,7 @@ public static void writingFile(String dir,String text,String file) throws SftpEx
session = null;
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(UsingJsch.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down Expand Up @@ -155,7 +157,7 @@ public static String readingFile(String remoteFile)
session = null;
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(UsingJsch.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
3 changes: 2 additions & 1 deletion src/main/util/upload/Upload.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;

import main.student.studentdao.StudentDAO;
import main.util.sshcommands.SSHCommands;
import net.neoremind.sshxcute.exception.TaskExecFailException;

Expand All @@ -27,7 +28,7 @@ public Upload()
{
Properties prop=new Properties();
try {
prop.load(new FileInputStream("Files//SSHinfo.properties"));
prop.load(Upload.class.getResourceAsStream("/SSHinfo.properties"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
Binary file added src/splash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c20bdd0

Please sign in to comment.