Click here to Skip to main content
15,909,051 members
Home / Discussions / Java
   

Java

 
GeneralRe: looking for simple java code to read serial port Pin
Luc Pattyn2-Sep-10 8:55
sitebuilderLuc Pattyn2-Sep-10 8:55 
GeneralRe: looking for simple java code to read serial port Pin
Peter_in_27802-Sep-10 13:38
professionalPeter_in_27802-Sep-10 13:38 
GeneralRe: looking for simple java code to read serial port Pin
Luc Pattyn2-Sep-10 14:02
sitebuilderLuc Pattyn2-Sep-10 14:02 
GeneralRe: looking for simple java code to read serial port Pin
aliyesami2-Sep-10 18:39
aliyesami2-Sep-10 18:39 
GeneralRe: looking for simple java code to read serial port Pin
Richard MacCutchan5-Sep-10 5:43
mveRichard MacCutchan5-Sep-10 5:43 
Questionjava with emf & rcp vs c# Pin
manni198130-Aug-10 19:57
manni198130-Aug-10 19:57 
AnswerRe: java with emf & rcp vs c# Pin
Cedric Moonen1-Sep-10 20:52
Cedric Moonen1-Sep-10 20:52 
Questionhello stuck in restore of mysql via java IO Pin
Alok Sharma ji30-Aug-10 3:12
Alok Sharma ji30-Aug-10 3:12 
hi i have successfully done the backup process of mysql in java but when it came to restore i failed after trying for three hrs. and i desperately need it i dont know what i am doing wrong in my code , currently my IDE is netbeans
String ip="localhost";
        String port="3306";
        String database="dbname";
        String user="user";
        String pass="pass";
        String path;
        JFileChooser chooser = new JFileChooser();
        chooser.setCurrentDirectory(new File("."));
        chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        chooser.showSaveDialog(null);
        path = chooser.getSelectedFile().getAbsolutePath();
        System.out.println(path);

        String dumpCommand ="mysql" + " -h" + ip +" -port"+ port + " -u" + user +" -p" + pass+" "+ database +" <"+path;
        //"mysql -hlocalhost -port3306 -uroot -pamit mms <c:\backupfile.sql"
        Runtime rt = Runtime.getRuntime();
        File test=new File(path);
        PrintStream ps;
        try{
        Process child = rt.exec(dumpCommand);
        ps=new PrintStream(test);
        InputStream in = child.getInputStream();
        int ch;
        while ((ch = in.read()) != -1) {
        ps.write(ch);
        System.out.write(ch); //to view it by console

        }
        JOptionPane.showMessageDialog (null,"BackUP Successfully Completed");
        InputStream err = child.getErrorStream();
        while ((ch = err.read()) != -1) {
        System.out.write(ch);
        }
        }catch(Exception exc) {
        exc.printStackTrace();
        }


it always shows some sql help commands in system.out and the command "<" is surely not accessing in java code instead by using it , it gives the output as unknown command \b (start of backupfile name as c:\backup.sql)
Confused | :confused:
Questionjava Pin
emasejohn27-Aug-10 0:25
emasejohn27-Aug-10 0:25 
AnswerRe: java Pin
David Skelly27-Aug-10 4:04
David Skelly27-Aug-10 4:04 
QuestionOn Update of java ,the application nto working. Pin
002comp26-Aug-10 20:54
002comp26-Aug-10 20:54 
AnswerRe: On Update of java ,the application nto working. Pin
Richard MacCutchan26-Aug-10 22:42
mveRichard MacCutchan26-Aug-10 22:42 
AnswerRe: On Update of java ,the application nto working. Pin
David Skelly27-Aug-10 3:45
David Skelly27-Aug-10 3:45 
GeneralRe: On Update of java ,the application nto working. Pin
002comp29-Aug-10 22:30
002comp29-Aug-10 22:30 
GeneralRe: On Update of java ,the application nto working. Pin
Richard MacCutchan30-Aug-10 2:45
mveRichard MacCutchan30-Aug-10 2:45 
Questionmultiplexer code Pin
bozorgvar26-Aug-10 1:04
bozorgvar26-Aug-10 1:04 
AnswerRe: multiplexer code Pin
Richard MacCutchan26-Aug-10 2:08
mveRichard MacCutchan26-Aug-10 2:08 
QuestionHow to set classpath of java thru Coding for applets Pin
002comp24-Aug-10 19:42
002comp24-Aug-10 19:42 
AnswerRe: How to set classpath of java thru Coding for applets Pin
Richard MacCutchan24-Aug-10 21:50
mveRichard MacCutchan24-Aug-10 21:50 
GeneralRe: How to set classpath of java thru Coding for applets Pin
002comp24-Aug-10 22:12
002comp24-Aug-10 22:12 
GeneralRe: How to set classpath of java thru Coding for applets Pin
David Skelly24-Aug-10 22:29
David Skelly24-Aug-10 22:29 
GeneralRe: How to set classpath of java thru Coding for applets Pin
Richard MacCutchan24-Aug-10 22:30
mveRichard MacCutchan24-Aug-10 22:30 
AnswerRe: How to set classpath of java thru Coding for applets Pin
David Skelly24-Aug-10 22:17
David Skelly24-Aug-10 22:17 
GeneralRe: How to set classpath of java thru Coding for applets Pin
002comp25-Aug-10 0:01
002comp25-Aug-10 0:01 
Questionhow to develop steganography project in java Pin
patel taher20-Aug-10 22:03
patel taher20-Aug-10 22:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.