Old programmer--way new to Java

Hello :-)
I'm just getting into writting Java applets. I've figured out how to do basic stuff like layouts with form fields and buttons, adding event listeners, and basic graphics. Simple stuff.
Now, the -fun- stuff--I'm try to use JDBC to connect to a test MS Access database, and as you would have guessed, I'm failing and have almost no clue :-/
Can I ask a dumb question? What does this actually mean...
Class.forName ( "sun.jdbc.odbc.JdbcOdbcDriver" );I'm not even sure if I have my Java development environment setup correctly. Does the statement above refer to a path on my machine? Like c:/sun/jdbc/obdc/jdbcodbcdriver/ ???? I found a file called "jdbcodbc.dll" in a folder. Is that the actual driver that needs to be loaded to access the dbase?
Can you tell I'm really not sure what I'm doing yet ;-)
You will be my newest and most favorite hero if you can help me understand how to use JDBC.
Thanks for reading,
Mark Deibert

You cannot connect to the JdbcOdbcDriver using an applet. Think about it. You are downloading the applet to the client browser. The driver is located on the client machine. An applet has certain limitations on what it can do and cannot do on the client machine. One of the limitations is that it cannot connect to a driver. You need to use a Type 3 or Type 4 SQL Driver for your database

Similar Messages

  • New to JAVA, but old school to programming

    Objects & Classes & Methods, Oh my!
    I'm pretty new to java, but I've been programming in several languages over the years. I thought it was about time to update my skill set, especially with the job market as it is today. I wanted to go JAVA because it's not specific to any environment.
    I picked up a begining JAVA book and was a little confused. When I was learning programming a program was called a program. a peice of code in a program called by a statement was called a subroutine (it was performed then control returned to the calling line and continued).
    Now I'm trying to make sense of everything I have read so far and trying to relate it back to my old school of thinking. I was hoping it would make it easier to retain and I could expand it as I learn and possibly realize that it IS different. I know it's a new way of thinking, but stay with me for minute.
    What I used to call a program is now a CLASS in JAVA (this can be a collection of code or other objects). A sub-routine in a CLASS is a Method. I know that the language part will come as I use it since I understand if's then's and whatever you use to gosub or goto, but I want to make sure I have down the lingo before I go to deep.

    I have no idea how you can compare Java to Cobol.
    DataFlex? How about that! In about '84 I switched to
    DataFlex from dBaseII. In '91 DataFlex changed from
    procedural to OOP. It took most of us at least a year
    to adjust, and then some to write concrete code. It
    was tough. They had bugs and we were limited with DOS.
    BUT, it was a great OOP training experience. Anyhow,
    needless to day Java is miles ahead on all fronts.Small world. I was stuck in the old DataFlex Ver 2.3 at that time. The company I worked for had the newer OOP package. I did get to work with it some, but not enough to become totally familiar with it. We started to move out of DataFlex towards PowerBuilder towards the end of 1995. I did get some OOP from that experience, but again only enough to learn about global variables, instance variables, and a few other items. I hoping that I will be able to get the solid OOP background that I need from JAVA since I hear through the grapevine that it may be a new tool that we will be looking at to enhance our programming. I was looking at PERL but even the PERL programmers we have agree that JAVA is more scalable.

  • Restored old phone to new phone and lost ALL my pics, is there any way to "unrestore" a phone?  i thought i backup my new phone before the restore but am unable to find it.  HELP

    Got a new phone.  Took pics on vacation with new phone.  Wanted to sync old phone with new phone.  Restored old phone to new phone, not realizing it would erase new phone content.  Is there any way to get that info back?  Thought i had performed a back up, but am unable to find it.  HELP

    With a backup yes, no backup then no.

  • Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Yes, it will. You cannot merge information on the phone. If you want the old messages, you will need to restore from a backup of the old phone, which will make the new phone look just like the old phone. If you want to save the messages from the new phone, you will not be able to get the messages from the old phone.

  • What is the Best way to move my library from old PC to new PC?

    what is the Best way to move my library from old PC to new PC?

    See this migrate iTunes library post.
    tt2

  • If you decide to move up to an iPad with greater storage, is there a way to transfer all of your apps and information from the old to the new.

    If you decide to move up to an iPad with greater storage, is there any way to transfer all of your apps and information from the old to the new.

    Transferring from old to new
    http://support.apple.com/kb/HT2109

  • Is there a way to view Java content on new iPad?, Is there a way to view Java content on new iPad?

    I have a Samsung Galaxy Tab 10.1 that although does not view java it does at least allow me to watch animated images such as satellite images.  I recently upgreaded to the new iPad and it will not work with mpeg or java looping.  Does anyone know if there is a way to get Java to work on the new iPad?

    I just read through several links stating that Java is not supported.  Oh well, had to ask anyway.  The new iPad is so new I was hoping that something may have changed, but not yet.

  • Is there any way to transfer itunes from my old computer to new computer

    is there any way to transfer itunes from my old computer to new computer. Any help is greatly appreciated. THANKS

    Yes the 2 main ways are with an ipod and external drive. Apple covers doing it with an ipod but you can follow the same steps, just skip afew http://docs.info.apple.com/article.html?artnum=300173

  • Why can't I transfer my iTunes from my old laptop to new?  Only way seems to sync iPod to new laptop and wipe out all the stored stuff!

    Why can't I transfer my purchased downloads from iTunes from my old laptop to new?  The only option seems to be sync my iPod to the new playlist, and sacrifycing everything that's already stored on it.

    Have a Look Here   iTunes: How to move your music to a new compute
    Also, See Here...  http://support.apple.com/kb/HT2519

  • For windows users,  best way to transfer photos from old iphone to new iphone

    I have a friend who just purchased new iphone and she'd like to transfer photos from old iphone to new iphone.
    What is the best steps for her to take?
    She has a Windows machine.
    thanks in advance!!!

    Make sure iTunes is loaded on the PC
    If all she wants are photos, she has to have the photos on her PC, not just on the old phone.  The old iPhone backup doesn't save the actual photos, just the setting pointing to where the photos came from.
    If the photos are on her PC, your should be able to sync them to the new iPhone with the Photos tab in iTunes (after the new phone is plugged in).
    If the photos aren't on her computer, she can copy them from whatever computer has them (assuming she has access to it).

  • Old to a new Version

    I want to translate the old version of program in Java FX 1.3 to a new (2.0). I think that helop me learn more. But I have a problem with that example.
    package javafxshapes;
    import javafx.scene.text.Font;
    println("Font families:");
    for (family in Font.getFamilies()) {
        println(family);
    println("\n\nFonts:");
    for (name in Font.getFontNames()) {
        println(name);
    println("\n\nTahoma fonts:");
    for (name in Font.getFontNames("Tahoma")) {
        println(name);
    }I would be grateful for any help, hints :))

    It works :)
    I also have another question but this time it concerns the images not text.
                ImageView {
                    image: Image {
                                backgroundLoading: true
                                url: "{__DIR__}/time.png"
                }I have the problem with "url" I have tried another way(getClass().getResourceAsStream) but I think that's not the same.
            ImageView iv = new ImageView();
            Image image = new Image("time.png",true);
            iv.setImage(image);And the background loading works, because when I change the parameter for true and false and I check it with this command, the results are ok:
    System.out.println(image.isBackgroundLoading());

  • Old Logic + a new Mac = can't open old projects anymore. De/re-install?

    Hi everybody,
    maybe someone can advise me with this problem:
    I bought a new Mac recently, did install a fresh OSX 10.5 and then used migration assistant to transfer my old user account from my old Mac (10.4), incl. all files. It did take a night, but it worked - or so I thought. Actually all applications work as they should, except for Logic. I had to re-authorize a few plug-ins, but then all seemed to be cool. I can open a new project, record audio, midi, add plug-ins, all cool. But I ended up with 3 problems, which are really annoying:
    1) EXS24 couldn't find most of the samples anymore. Most, not all. I have 4 internal HDs, one for the system, one for audio recordings, one for samples, one for "other stuff". 2 of these disks came from the old Mac, 2 new ones, content copied from old Mac. In the EXS prefs I set "search for samples" to "all volumes", but it still didn't work perfectly. Finally I bought EXSManager Pro and now it seems to work again. I didn't try ALL samples yet, but the +/- 20 EXS instruments I tried, did load all samples.
    2) Space Designer doesn't load impulse responses for the presets anymore. They're there and at the right place. I can load SD and import an existing impulse file, no problem. But the presets don't find the required files anymore.
    3) Now - and this is the worst one - I can't open old projects anymore. I just can't. It starts loading, I see the rainbow thing (don't know the right word), it turns black & white and that's it. You can watch this forever and nothing happens.
    Regarding all 3 issues:
    I don't get any error messages. Logic doesn't crash, I can't click 'apple-.' to stop loading/searching. It just doesn't open the file. I had a coffee, a pizza, I let it try for 2 hrs+, but neither did it load a SD preset or an old song file. All I can do is manually quit Logic.
    But when I open Logic with the CTRL-button down and click "no" to core audio I can open all songs. Of course I can not hear a tone then, but it's all there. Opening a song takes 3 secs then. I tried to safe a song then with a different name, re-started Logic with core audio but same result. It get's "stuck".
    Of course I checked user permissions and all the usual trouble shooting clicks, but still Logic has a mind of it's own. I installed a 2nd user with admin rights, though still the same, plus all the 3rd party plug-ins refusing to work.
    Now I was thinking, should I de-install Logic and re-install from the original CDs maybe. And if so, is there anything special I have to take care of? Like manually removing any prefs or cache files?
    Or completely re-install the whole Mac? (pleeease no....)...
    If anybody has any idea, it'd be highly appreciated.
    Thank you in advance and for the energy to read my little novel here,
    cheers,
    Joern

    Ok, either my question was too long or nobody seems to have an answer. Sad, either way
    Here's something I found out in the meantime, maybe this is interesting for somebody or maybe - problem's not totally solved - enough info for any of you to give me further advice.
    When I start Logic Core Audio driver de-activated, I can open old songs. Then I save them in a new folder with all audio files and a new name. And I remove all EXS24 instruments as well as the Space Designer. I quit Logic, re-open with Core Audio activated and I can open the song.
    Problem no.1: EXS24 instruments don't find the appropriate samples, but EXSMananger Pro did help me with this. Same problem with Space Designer, which doesn't find the impulse responses, connected to a certain preset.
    Two questions, every idea would be great!
    - Is there any way to teach Space Designer Presets where to look for impulse respones. I can load IR samples directly and create a new preset, but I can't use my old ones.
    - Is it possible to install Logic from scratch over an existing version? Or how should I de-install everything connected with Logic and then install a fresh version from CD?
    Thank you again,
    Joern

  • How to transfer iBooks books & PDFs from old iPad to new iPad?

    (Well, it seems my title got truncated; originally it read: How to transfer iBooks books & PDFs from old iPad to new iPad?)
    I've recently gotten an iPad Air to replace my previous iPad 2. I have a bunch of books and PDFs in iBooks on the old iPad, and want to transfer them to the new iPad.
    A search of Apple Support informs me that anything I've purchased from iBooks can be downloaded at any time to any of my devices (works like Amazon's Kindle system, apparently), but nearly all the content I have in iBooks on the iPad I've downloaded from other sources, so it won't be in my iBooks Store account (I might have bought one book there).
    I've also seen several instructions on how to copy all my data from the old iPad to the new via Backup & Restore, but that seems to require restoring the new iPad to factory setup, which would delete everything I have on it now – including a bunch more books I've gotten since I started using the new iPad. And I don't want to copy everything, only the books/PDFs (the new iPad has everything I want, except for the books).
    Since there seems to be no way to transfer files directly from one iPad to the other, it seems it must be done via iTunes on my MacBook Pro (and I want to copy all the books/PDFs to the computer anyway). So I connected the iPad 2 to my MacBook Pro (OS X 10.9.4) and opened iTunes (11.3.1). Then clicked on the iPad's name in the sidebar to the left, and on Books below it. I see a list of the books on the iPad. I check the little boxes by all their names to select them (not sure if that's necessary, but it seems like a good idea), then click on the Sync button at the lower right, to the right of the bar at the bottom of the window with colored bands showing memory usage on the iPad. A message appears saying "The app 'iBooks' was not installed on the iPad '[name]' because the app could not be found."
    But iBooks is already on the iPad; I have it open and see the list of books in it, which matches the list shown in iTunes. The message has a "More Information" button; I click that and it opens an Apple Support article titled "iOS: An app you installed unexpectedly quits, stops responding, or won’t open": "Learn what to do if you see one of these issues with an app you downloaded from the App Store on your iPhone, iPad, or iPod touch: The app unexpectedly quits; The app stops responding; You can’t open the app." But none of these apply; the iBooks app is on the iPad, and works fine there.
    The article suggests: (1) Restart the App. I've done that, no help. (2) Restart your device. Done that, no help. (3) Update your device software and your apps. The iPad is running iOS 6.1.3, iBooks 3.1.3; not the latest versions, no, but I'd rather not update it to newer, bigger, more power-hungry versions if I don't have to. Is it that iTunes 11 doesn't work with iOS 6? I haven't seen this stated anywhere.
    So instead I click the OK button on the message, but nothing further happens, so far as I can tell: None of the books/PDFs on the iPad (about 380MB) appear in iBooks on the MacBook Pro.
    I click on "Books" in the row of words across the top of the iTunes window, and it shows me the single PDF presently in iBooks on the MacBook Pro. I click the box by "Sync Books", and a message appears: "Are you sure you want to remove existing music, movies, TV shows, books, and tones from this iPad and sync with this iTunes library?" Well, no, that's exactly what I DON'T want to do. I don't want to erase the 380MB of books and PDFs on the iPad and replace them with the single PDF now in iBooks on the MacBook Pro. I want to copy the books from the iPad 2 to iTunes, so I can copy them back to the new iPad Air (if, God willing, I can figure out how to do that without erasing the books now on the iPad Air).
    I've been working with Macintosh computers for over 26 years. It's always been a fairly simple process to copy files from one computer to another. I don't want to "sync" all the data (address book, email, God knows what else) on the iPad with the corresponding information on the MacBook Pro – especially if that will erase everything on the iPad (which has information not on the MacBook Pro, e.g. 380MB of books). I just want to copy the books and PDFs in iBooks from the old iPad to the MacBook Pro, then to the new iPad, adding them to the books on the new iPad, so I don't lose anything.
    Can anybody give me a clue?

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    How to Transfer App Data and Game Saves from One iOS Device to Another
    http://lifehacker.com/5891964/can-i-transfer-app-data-and-game-saves-from-my-iph one-to-a-new-ipad
    How to transfer data from your old iPad to your new iPad
    http://www.imore.com/how-transfer-data-your-old-ipad-your-new-ipad-air-or-retina -ipad-mini
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • How can I open help file (HTML or .chm) from Java Web Start (new to JAVA)

    Hi All,
    Im trying to open the help file of my application.
    When trying to access the help file from the GUI (pressing F1 for launching the help file), I'm geting the an error, something like:
    "Can't show help URL: jar:file:C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart\RMjar-name!/com/resources/helpFiles/MyHelpFile.html"
    It seems that the file which is packed in a jar, was downloaded to the Java Web Start cache directory:
    C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart
    The code which is activated when launching the help file is:
    try
                ResourceBundle resourceBundle = DoubleResourceBundle.getBundle("Resource", "ResourceImpl");
                RuntimeUtil.launchFile(new File(resourceBundle.getString("help.file")));
            } catch (IOException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
            }where the property "help.file" is in some property file in the resource bundle named "Resource", and looks like this :
    help.file="com/trax/docs/help/global/MyHelpFile.html"
    The function "RuntimeUtil.launchFile" knows how to launch any file in its default application, and indeed it does launches the html, when giving it an absolute path to the file on my PC, as "C:\Helpfiles\MyHelpFile.html" as such:
    RuntimeUtil.launchFile("C:\Helpfiles\MyHelpFile.html");My question is :
    The application is going to be deployed on a Customer PC. How can I access the html file from the code, with a relative path and not its absolute path on the customer pc, which I can't know?
    I found these restrictions regarding web start:
    (copied from "http://rachel.sourceforge.net/"):
    *Rule 1: Java Archives only. No loose files.* All your resources have to be packaged in Java Archives (jar) if you want to have
    them delivered to the user's machine and kept up-to-date automatically by Java Web Start.
    *Rule 2: No file paths.* You can't use absolute or relative file paths to locate your
    jars holding your resources (e.g. <code>jar:file:///c:/java/jws/.cache/resources.jar</code>).
    Absolute file paths won't work because you never know where Java Web Start
    will put your jar on the user's machine. Relative file paths won't work because Java Web Start
    mangles the names of your jars (e.g. <code>venus.jar</code> becomes <code>RMvenus.jar</code>)
    and every JNLP client implementation has the right to mangle your names
    in a different way and you, therefore, can't predict the name with
    which your jar will be rechristend and end up on the user's machine in
    the application cache.Seems complex or impossible, to perform a simple task like opening a file.
    Please advise (I'm new to Java and Web Start).
    BTW, I'm working with IntelliJ IDEA 5.0.
    Thanks,
    Zedik.
    {font:Tahoma}{size:26pt}
    {size}{font}

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • How can i transfer everything from old iphone4s to new iphone5?

    just bought new iphone5, how do i transfer all the apps/contacts/etc from olf iphone4s?

    The easiest way is to back up old phone to icloud and then restore new phone from that old phone backup. Any purchased content such as apps and songs from the itunes and apps stores can be downloaded again.
    These directions are for an ipad, but the method is the same.
    How to transfer everything from old iPad to new
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/

Maybe you are looking for

  • MX2004 can no longer launch on new hard drive

    I've been using Dreamweaver MX 2004 for a while. Ran fine; could do all my work, no problem. Recently the hard drive on my laptop crashed and I installed a new one; moved all data over and 98% of my apps work fine. Dreamweaver is another story. At fi

  • File Path using file adapter

    Hi Experts. I have a file to proxy scenario where I just want to get the file path and dont want to read the whole file using sender file adapter. Is there any way where i can just get the file path and the file should not get prosessed in XI/PI. Tha

  • Help Zen nano p

    <p align="center">[img"]http://img37.imageshack.us/img37/4588/zennanoitaliaqu5.jpg" width="95" height="35"> Hello ! I?m italian ! I must buy a ?Creative Zen nano plus GB? and i am searching some information... )? Have the Zen the possibility to load

  • Links support in parallel flow

    While evaluating BPEL PM I came across problem with links which connect activities within flow activity. By my experience (I'm testing on quite large process) links aren't followed (and trasitionCondition aren't check too). Even if , it can not be se

  • I have passcode lock enabled, but I do not have the picture frame option. ipad2. How do I enable?

    On my ipad2 I have the passcode lock enabled, but do not have a picture frame option.  How do I enable this option?