1,076,379 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by TakinANapster

I'm not having any luck making my Java Console visible. The service is started.

How do I bring up the Java Console? I know this must be a stupid question to most of you out there :(

TakinANapster
Newbie Poster
5 posts since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

I clicked on "Show Console" and exited Control Panel, and refreshed my webpage and the console did not pop up. Shouldn't it have?

The only time I have seen it is when I had an error in my Java code that HTML did not like and I had a red mark ... that if I clicked the Java Console would come up; but I knew nothing of what to do with the console.

I'm searching on Youtube and Google for a tutorial on the Java Console but no luck so far. Can anyone recommend any links or good books?

TakinANapster
Newbie Poster
5 posts since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Sorry....I meant to say, this did "NOT" fix the problem...

TakinANapster
Newbie Poster
5 posts since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Thanks for the fast response!

I'm not sure how to use my Java Console yet. I have went thru lots of tutorials so far, but none have touched on that.

I tried putting the printStackTrace() method, and it forced me to actually write a method, which I did ... which simply statet "System.out.println("ERROR!!!");".

This this did fix the problem, nor did I get the message "ERROR!!!".

Any other ideas? I'm at a total loss. I will start studying the Java Console immediately!

ThanX in advance!

TakinANapster
Newbie Poster
5 posts since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Hello!
1st let me apologize if I have duplicated a post. I am a newbie to DaniWeb (and to Java and HTML) and have searched your forum for a few hours now and not found and answer to my problem. I was hoping someone could help.

I have a simple Java program that reads a MS Access Database and displays selected fields from each record on the screen until the end-of-file. It works wonderful in Eclipse!

I then have a HTML file which implements the java .class file created "TechServices.class".

==============================================================================================================
Here is the code for the Java program:

import java.sql.*;
import java.applet.*;
import java.awt.*;


public class TechServices extends Applet { public static void main(String[] args) {
    try {          
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");          
        String accessFileName = "C:/TEST/Tech ServicesCOPY";          
        String connURL="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+accessFileName+".accdb;";          
        Connection con = DriverManager.getConnection(connURL, "","");          
        Statement stmt = con.createStatement();          
        stmt.execute("select * from tblProblemInformation"); 
        // execute query in table student 
        ResultSet rs = stmt.getResultSet(); 
        // get any Result that came from our query  
        if (rs != null)  while ( rs.next() ){
            String pdate = rs.getString("dtmProblemDate");
            if (pdate != null) pdate = pdate.substring(0,10); // strip off time of 0's
            String cdate = rs.getString("dtmClosedDate");
            if (cdate != null) cdate = cdate.substring(0,10); // strip off time of 0's
            System.out.println("#" + rs.getString("strProblemNumber") 
                                + " Problem-Date: " + pdate
                                + " Close-Date: " + cdate
                                + " AssignedTo: "+rs.getString("strAssignedTo"));
//          System.out.println("0---------1---------2---------3---------4---------5---------6---------7---------8");
        }   
        stmt.close();             
        con.close();         
    }         
    catch (Exception err) {             
        System.out.println("ERROR: " + err);         
    } 
} 
}

==============================================================================================================

Here is the code for the HTML:

<html>
<head>
</head>
<body bgcolor="pink">
<applet code="TechServices.class" width=1000 height=500>
</applet>
</body>
</html>

==============================================================================================================

Can anyone tell me why this produces nothing but a blank screen when I run the HTML file?

Thanks in advance for your attention to this matter!

TakinANapster
Newbie Poster
5 posts since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page rendered in 0.0519 seconds using 2.49MB