Problem setting Vim as C++ IDE / dwm

Hi guys,
i am trying to set up Vim as my C++ IDE since 2 days and no success so far.
I have installed Vim
pacman -Q vim
vim 7.3.661-1
I have downloaded vim-latex and clang tar balls,
extract and place appropriate directorys in ~/.vim e.g. plugins and doc
from whitin vim
:helptags ~/.vim
my ~/.vimrc
" Author:
" Zhelyazko Petrov
" [email protected]
" Version:
" 1.0
" Set how many lines of history to remeber
set history=700
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set 7 lines to the cursor when moving vertically using j/k
set so=7
" Set runtime path
set runtimepath=/home/dreadz/.vim/
" Set grep to always generate a file-name.
set grepprg=grep\ -nH\ $*
"this is mostly a matter of taste.
set sw=2
" Turn on wild menu
set wildmenu
" Always show current position
set ruler
" Height of the command bar
set cmdheight=2
" Configure backsapce to behave as it should
set backspace=eol,start,indent
set whichwrap+=<,>h,l
" Ignore case when searching
set ignorecase
" When searching try to be smart
set smartcase
" Highlight search results
set hlsearch
" Make search acts like in modern browsers
set incsearch
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sounds on errors
set noerrorbells
set novisualbellset t_vb=
set tm=500
" Set utf8 as standart encoding and en_US as standart lang
set encoding=utf8
" Always show the status line
set laststatus=2
" Show line number
set number
" Some stuff to get the mouse going
set mouse=a
set ttymouse=xterm2
When i open .cpp file and i run :make i get the following message:
make: *** No targets specified and no makefile found. Stop.
Press ENTER or type command to continue
uname -a
Linux ufo 3.6.2-1-ARCH #1 SMP PREEMPT Fri Oct 12 23:58:58 CEST 2012 x86_64 GNU/Linux
I would appreciate any suggestions.
Many thanks!

make: *** No targets specified and no makefile found. Stop.
Press ENTER or type command to continue
This is exactly what make says when it couldn't find a Makefile in the directory.  Do you actually have one in the directory with the .cpp file?  See the Wikipedia entry [1] for a good overview of the make process.  Also, the file should just be called Makefile with no extensions (.cpp or otherwise).  Remember, google is your friend [2]
[1] https://en.wikipedia.org/wiki/Makefile
[2] http://lmgtfy.com/?q=make%3A+no+targets … file+found
Last edited by jynnantonix (2012-10-21 06:09:44)

Similar Messages

  • Problems setting up iCloud & Outlook 2010

    Hi,
    I have just installed Outlook 2010 & am trying to set it up to work with iCloud. When I tick the boxes for Calendar & Contacts on the iCloud control panel & click apply it starts the set up process, but part way through I get an error message saying it can't set up due to an unexpected error. If I click cancel it leaves the boxes ticked, but iCloud does not appear in Outlook. If I click try again the iCloud control panel just constantly shows 'setting up' next to contacts & calendars. The only way to then stop it is using Task Manger. I did this before & it wiped out all my Outlook Contacts & Calander entries (fortunately I was able to get them back from my iphone using itunes).
    I have tried uninstalling / reinstalling the icloud control panel, & have also tried running 'Repair' on the Office 2010 setup, but still get the same problem.
    Anyone have any ideas?
    Thanks
    (PS I'm using Vista 64bit)

    Hi,
    I managed to get it working by doing Contacts &amp; Calendar separately.
    So, I turned Contacts on in the iCloud control panel leaving Calendar off, it did the setup correctly, then I turned Calendar on as well in the iCloud control panel &amp; again it did the setup correctly.
    Hope this helps you.
    I have discovered that iCloud &amp; Outlook doesn't work quite as well as I'd like it to - Outlook doesn't show any appointments from the iCloud calendar in the To-do bar (an Outlook problem) &amp; I've had some problems with the categories I'd given some Contacts (not sure if the problem is in Outlook or the iCloud, but although the categories appeared, filtering based on them didn't seem to).

  • Problems Setting up my wireless network with an Xb...

    Hi, I have had some problems setting up my wireless networking.
    I have everything switched on and am able to go online with the laptop and the Xbox with no problems but when I try to share media with the xbox I have problems.
    I have opened the ports specified in the setup from xbox on windows firewall and have no problem connection Via Ethernet cable but when using wireless the xbox cannot detect the laptop.
    I have checked the network map and both xbox and laptop are connected and have enabled sharing and am running sharing software.
    Below is the network map.
    I have also been having problems with BT software, the free virus protection will not install, The desktop help will not launch although it shows up on task manager and the installation disk does not launch correctly it doesn't get past the loading screen.
    I have had a printer on the wireless network and had no problems printing.
    If anyone knows how to resolve this please help.

    I have this same Motorola modem and I just verified that my 802.11n AirPort Express Base Station (AXn) can get Internet access with this modem without any issues.
    When changing ISPs (or networking equipment) it's always a good idea to start from "scratch" in configuring your equipment.
    I would recommend that you do the following as a minimum:
    Power-down the modem, AirPort base station, and computer(s).
    While all of the devices are powered-down, perform a "factory default" reset on the base station. This will get it back to its "out-of-the-box" configuration and make setting it up much easier, especially if you use the "Assist me" process within the AirPort Utility. (ref: Resetting an AirPort Base Station or Time Capsule)
    After the base station resets, go ahead and power it back down.
    Power-up the modem; wait at least 10-15 minutes.
    Power-up the base station; wait at least 5-10 minutes.
    Power-up your computer(s).
    In this basic configuration, computers connected to the base station, either by wire or wireless (as appropriate for the base station type), should now be able to access the Internet through the ISP's modem. Once Internet connectivity has been verified, you can use the AirPort Utility to configure the base station for wireless security and any other desired options.

  • Problems setting up Mail to Exchange

    Hey everyone,
    Having a few problems setting up mail to exchange on a Nokia 5800.
    We have the latest version of Mail to Exchange installed.
    Were using Microsoft Exchange 2007.
    Example serup of what we have done:
    Mail to exchange - New profile - Input Username and Password of domain account - Input domain name - Chose Internet as means of connection -
    The Nokia goes off and searches for the domain information, finds it OK. Shows a message regarding a server certificate, we chose to install this certificate this time only.
    Phone crashes?
    Any ideas whats going on?
    Thansk

    Hi Jim,
    Depending on the customer feedback, it works fine. Apple Mail the client that comes with OSX supports standard protocols (POP3, IMAP, SMTP), these are all supported by Exchange 2010. 
    If you're running Mac OS 10.4 Tiger or Mac OS 10.5 Leopard, you can still use the Mac Mail App to connect to your account. However, you need to connect to your account without using IMAP or POP.
    If you're running Mac OS 10.6 Snow Leopard or Mac OS 10.7 Lion, you can use the Mail program included with those releases to connect to your email account automatically using an Exchange account.
    When you use Mac OS 10.6 Snow Leopard or Mac OS 10.7 Lion and connect using an Exchange account, you can use features that aren't available to users who connect through IMAP or POP, including iCal and Address Book.
    More details about Set up email in Mac OS X Mail, please refer to:
    https://support.office.microsoft.com/en-in/article/Set-up-email-in-Mac-OS-X-Mail-de372dc4-9648-4044-a76c-e8a60e178d54?CorrelationId=a0ce4c19-1492-4e3b-bc7e-4af83d3cb347&ui=en-US&rs=en-IN&ad=IN
    Additional, I find a similar thread about your question, for your reference:
    https://social.technet.microsoft.com/Forums/exchange/en-US/b112b61e-401f-4ad9-b459-a25673ff5407/connecting-to-exchange-2010-using-apple-mail?forum=exchange2010
    https://social.technet.microsoft.com/Forums/en-US/d3c9b4ad-822b-4a7c-88b8-39df3f166f96/how-to-setup-exchange-account-on-macbook-os-x?forum=exchange2010
    Best Regards,
    Allen Wang

  • Problems setting up MPLS

    A Chairde,
    Am having problems setting up MPLS between a AS5350 and 7609 , I have used commands stated in this link, enable MPLS incrementally on a network.
    http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/switch_c/xcprt4/xcdtagc.pdf
    The commands below are added to each router, and some troubleshooting.
    7609
    ip cef distributed
    interface Loopback0
    ip address 192.168.254.1 255.255.255.255
    tag-switching advertise-tags
    interface GigabitEthernet3/12
    ip address 192.168.230.162 255.255.255.248
    mpls label protocol tdp
    tag-switching ip
    AS5350
    ip cef
    mpls label protocol tdp
    tag-switching advertise-tags
    interface Loopback0
    ip address 192.168.254.2 255.255.255.255
    interface FastEthernet0/0
    ip address 192.168.230.161 255.255.255.248
    duplex auto
    speed auto
    mpls ip
    h323-gateway voip interface
    h323-gateway voip id cnibhco111 ipaddr 192.168.230.129 1719
    h323-gateway voip h323-id cnibhco112
    h323-gateway voip tech-prefix 71401
    h323-gateway voip tech-prefix 0030
    h323-gateway voip bind srcaddr 192.168.230.161
    ip rsvp bandwidth 64 64
    cnibhco112#sh tag-switching tdp neighbor
    Peer TDP Ident: 192.168.254.1:0; Local TDP Ident 192.168.230.161:0
    TCP connection: 192.168.254.1.49842 - 192.168.230.161.711
    State: Oper; PIEs sent/rcvd: 18/23; Downstream
    Up time: 00:12:54
    TDP discovery sources:
    FastEthernet0/0, Src IP addr: 192.168.230.162
    Addresses bound to peer TDP Ident:
    192.168.100.17 192.168.100.25 159.107.212.49 172.16.8.81
    192.168.230.130 192.168.230.77 192.168.230.81 192.168.254.1
    192.168.210.6 192.168.127.6 192.168.210.106 192.168.127.66
    192.168.127.138 192.168.210.146 192.168.210.142 192.168.210.122
    192.168.210.17 192.168.230.140 192.168.230.26 192.168.230.74
    192.168.230.10 192.168.230.14 192.168.127.130 192.168.127.142
    192.168.230.6 192.168.230.70 192.168.230.34 192.168.210.178
    192.168.200.25 192.168.210.126 192.168.232.1 192.168.231.1
    192.168.200.17 192.168.210.102 190.168.200.245 190.168.200.225
    190.168.201.241 192.168.230.98 192.168.210.14 190.168.201.201
    190.168.201.209 192.168.210.162 192.168.210.210 190.168.201.205
    192.168.230.38 190.168.200.249 190.168.200.217 190.168.200.253
    192.168.230.162
    cnibhco112#
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    cnibhco112#traceroute 192.168.254.1
    Type escape sequence to abort.
    Tracing the route to 192.168.254.1
    1 192.168.230.162 0 msec 0 msec *
    cnibhco112#traceroute 192.168.230.162
    Type escape sequence to abort.
    Tracing the route to 192.168.230.162
    1 192.168.230.162 0 msec 0 msec *
    cnibhco112#

    Ro,
    Thanks for the respone, have been playin, with MPLS for last few hours.
    The routing between the loopbacks is now working, can PING 7609 Loopback from AS5350 ,and vice versa. (used static routes).
    Having problem with TDP / LDP on routers,
    mpls label protocol ldp / tdp command works correctly on both routers, but the
    tag-switching tdp router-id Loopback0 force
    command works on the 7609, but when I add it onto the AS5350 , the command "mpls ldp router-id Loopback0 force" appears on the startup script.
    The opposite is true for the 7609 , you add MPLS LDP command, and TAG-SWITCHING command appears instead.
    Any Ideas, as different configs of this leave me with forwarding table with both tags added, but not been able to ping the loopbacks !!!
    When I can ping bot loopbacks, the OUTGOING TAG , disapears.....
    Problem is LOOPBACK Commands on bot routers default to LDP (AS5350) , or TDP (7609). Any Ideas ...
    mpls label protocol tdp
    tag-switching tdp router-id Loopback0 force
    mpls label protocol tdp
    mpls ldp router-id Loopback0 force
    cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Ho
    tag tag or VC or Tunnel Id switched interface
    18 17 192.168.254.0/24 0 Gi3/12 192.168.2
    MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
    00097CA3293000127FCDBA808847 00011000
    No output feature configured
    Per-packet load-sharing
    cnibhco100#traceroute 192.168.254.2
    Type escape sequence to abort.
    Tracing the route to 192.168.254.2
    1 192.168.230.161 [MPLS: Label 17 Exp 0] 0 msec 0 msec 0 msec
    2 192.168.230.162 0 msec 0 msec 0 msec
    But no PINGING 192.168.254.2
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    17 18 192.168.254.0/24 1915668 Fa0/0 192.168.230.162
    MAC/Encaps=14/18, MRU=1500, Tag Stack{18}
    00127FCDBA8000097CA329308847 00012000
    No output feature configured
    Per-packet load-sharing
    cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Ho
    tag tag or VC or Tunnel Id switched interface
    18 17 192.168.254.0/24 752551 Gi3/12 192.168.2
    MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
    00097CA3293000127FCDBA808847 00011000
    No output feature configured
    Per-packet load-sharing
    WHEN BOTH LOCAL AND OUTGOING TAG, CANNOT PING EITHER WAY !!!
    HAVE LABEL PROTOCOL AND LOOPBACK FORCE on AS5350
    HAVE LABEL PROTOCOL ON 7609
    WHEN ADD LOOPBACK FORCE on 7609 , CAN PING BOTH LOOPBACKS,
    BUT OUTGOING TAG DISAPEARS
    cnibhco112#PING 192.168.254.2
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.254.2, timeout is 2 seconds:
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    17 Untagged 192.168.254.0/24 598678 Fa0/0 192.168.230.162
    MAC/Encaps=0/0, MRU=1504, Tag Stack{}
    No output feature configured
    Per-packet load-sharing
    cnibhco112#
    mpls label protocol tdp
    tag-switching tdp router-id Loopback0 force

  • Problems setting up a Domain - javax.management.InstanceNotFoundException

    I am having problems setting up a Domain. The following steps summarize
    what I have done.
    1. Created FooDomain in d:/bea/wlserver6.0/config and created
    appropriate config.xml, startup scripts, security, etc... (FooDomain
    boots ok)
    2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
    3. Connected to FooDomain via console (works ok).
    4. Defined machine FooMachine (happens to be localhost)
    5. Defined new server FooServer (in addition to default myserver) and
    assigned it to FooMachine.
    6. Created a new directory d:/managedServers/FooServer (note - outside
    installation directory)
    7. Created directories d:/managedServers/FooServer/logs &
    d:/managedServers/FooServer/applications
    8. Copied sample startManagedServer.cmd from mydomain to
    d:/managedServers/FooServer & modified appropriately.
    9. Ran startManagedServer.cmd (Note: I was able to connect to the
    Administration Server ok)
    The problems are as follows. (From the console - pointing to the
    Administration Server for the FooDomain)
    1. I am unable to configure a DefaultWebApp_FooServer to be located at
    d:/managedServers/FooServer/applications. I get the following exeption:
    javax.management.InstanceNotFoundException:
    FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
    2. I get a similar error when trying to set FooServer log locations to
    d:/managedServers/FooServer/logs
    Any ideas as to why? This then begs the question, what if FooServer was
    on a different physical server altogether. How would I define the
    location of the DefaultWebApp and logs.
    Thanks
    jay ()

    If you want your application work, think my way. At least, all my teammates have used this method to build their development environment. If you are more interested to debug for Weblogic, contact your support representative. The tools from Administration console look very nice, but not function as you want (e.g., the tool to convert version 5.1 application to version 6, even monitor tools). Administration console is very nice to be used to configue the parameters for a domain, but not so trustful and not for application setup in my own experience and that is why I suggest you use mydomain and DefaultWebApp_MyServer as templates. By the way, I did modify config.xml manually to change the default web application entry, etc, to what I want.
    Jay Zammit <[email protected]> wrote:
    I did not modify config.xml manually. In fact, I am able to boot both the Administration Server & Managed Server. The problem happens when using the Administration console to assign my logs and Default Applications directory to the d:/managedServers/FooServer/logs, and d:/managedServers/FooServer/applications/DefaultWebApp_FooServer directories. Try it yourself. Go to the Configurer WebApp option and type in a fully qualified directory such as d:/managedServers/FooServer/applications/DefaultWebApp_FooServer
    and see if it works on your system.
    thanks
    jay ()
    Xiang Rao wrote:
    One suggestion. Use the default domain mydomain as a template. Just make a copy of "mydomain" in folder config and rename the copy to whatever you like. Use some help tools to search all files (non-binary files) in new domain for key word "mydomain" and replace these words with your new domain name. To build an application, just rename the DefaultWebApp_MyServer to what you like and search "DefaultWebApp_MyServer" in all files (non-binary files) in your new domain and replace these words with yournew application name. Note you need to modify the scripts accordingly. Then you can run "startWeblogic" in your new domain directory to start your new domain. Other parameters should be configured by Administration console. If you manually modify configuration files, you could expect some bad news without reason.
    Jay Zammit <[email protected]> wrote:
    I am having problems setting up a Domain. The following steps summarize
    what I have done.
    1. Created FooDomain in d:/bea/wlserver6.0/config and created
    appropriate config.xml, startup scripts, security, etc... (FooDomain
    boots ok)
    2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
    3. Connected to FooDomain via console (works ok).
    4. Defined machine FooMachine (happens to be localhost)
    5. Defined new server FooServer (in addition to default myserver) and
    assigned it to FooMachine.
    6. Created a new directory d:/managedServers/FooServer (note - outside
    installation directory)
    7. Created directories d:/managedServers/FooServer/logs &
    d:/managedServers/FooServer/applications
    8. Copied sample startManagedServer.cmd from mydomain to
    d:/managedServers/FooServer & modified appropriately.
    9. Ran startManagedServer.cmd (Note: I was able to connect to the
    Administration Server ok)
    The problems are as follows. (From the console - pointing to the
    Administration Server for the FooDomain)
    1. I am unable to configure a DefaultWebApp_FooServer to be located at
    d:/managedServers/FooServer/applications. I get the following exeption:
    javax.management.InstanceNotFoundException:
    FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
    2. I get a similar error when trying to set FooServer log locations to
    d:/managedServers/FooServer/logs
    Any ideas as to why? This then begs the question, what if FooServer was
    on a different physical server altogether. How would I define the
    location of the DefaultWebApp and logs.
    Thanks
    jay ()

  • Problems setting up my TC. Have just bought new iMac(OS 10.6.8) and  TC. I set it up. iMac cannot find it. I have tried direct connection with an ethernet cable to Mac or my wireless router but nothing. Just a flashing orange light. Help for a simpleton p

    Problems setting up my TC. Have just bought new iMac(OS 10.6.8) and  TC. I tried to set it up. iMac cannot find it. I have tried direct connection with an ethernet cable to Mac or direct to my wireless router but nothing. Just a flashing orange light. Help for a simpleton please. Have tried reseting TC, but to no avail.

    Just updated from 10.6.7 ---> 10.6.8 and had the same issue. Despite having done a clean install from 10.6 and got everything back off my TC, now Time Machine can't find it!
    Green light is on, ethernet cable conected, network CP says its conected but nothing. Airport Utility can't find it. Hit reset button, Orange flashing light but still no show in Airport Utility.
    But I know its there, as rebooting from 10.6 SL disk shows the backups are still ok?
    Hmm, ideas anyone?
    SBB

  • JDeveloper problem setting up a database connection

    I am having some problem setting up a connection to my database. Before I say any more let me explain what I need. I need 2 database connections 1 to a 10g R3 database and one to an 8.0.5.
    I do realize that JDeveloper will only connect back to 8.1.7 because of the JDBC version that is installed with it.
    What I really need to know is "Is it possible to define and use 2 different versions of JDBC" I really don't want to move back to the version that works with both because I am afraid of what performance/benefits I will lose from the latest and greatest.
    The latest version that I can determine will work with 8.0.5 is the last version for 9i.
    Any Ideas would be helpful.
    The reason for this situation is that I have a production database that I will have to keep up with until the full version of the system is complete so that is why I even care about 8.0.5.
    Thanks alot for your time,
    Thom

    I have a similar problem and I would much appreciate any help in this matter.
    I have a wireless network set at home with two computers connected to it:
    My workstation called Home-ws and my laptop called Acer. I can access the d:\ drive of my workstation from my laptop without any problem.
    On my workstation I installed the Oracle 10g product and on my laptop I installed Oracle SQL Developer. On SQL developer I am trying to create a connection to the Oracle server:
    My settings are as below:
    Connection name: orcl_system
    User name: system
    Password: ******
    Host name: Home-ws
    Port: 1521
    SID: orcl
    When I push test I am getting the following error message:
    Status: Failure –Io exception: The Network Adapter could not establish the connection
    Are there any special settings that should be made set up a wireless connection to my database?
    Then I did the following things below:
    1. I downloaded from oracle.com the instantclient-basic-win32-10.2.0.2-20060508.zip file and unzipped it in a folder called instantclient_10_2. There were a number of DLL and two jar files plus sqlplus.exe
    2. I started sqlplus from that server
    3. sqlplus failed with a similar error as sql developer.
    4. I checked for tnsping. There is no tnsping such and exe on my laptop. I looks like I have to install the DLLs I downloaded them but there are no instructions about how to install them. Should I just copy them in system32 folder?
    5. I looked for firewalls on my Home-ws workstation (where my oracle server is installed) and on my Acer laptop. The firewalls were activated. I added on exception called oracle for port 1521 on both computers and tried to connect again. I tried with both TCP and UDP options and it did not work in both cases.
    I am out of ideas. Any help would be much appreciated.
    Thank you in advance for your help.
    Julian

  • Having problems setting text to a JLabel!!

    HI *.*,
    i'm having problems setting text to a JLabel.
    i have a JFrame with a JPanels and on the JPanel i have a JLabel.
    I have a text field wihich is used to input text.
    So, i'm using textField.getText() to read the text of the text field and setText() to write it to the Label.
    but setText() isn't displaying the text on the label.
    I'm using NetBeans as an ide
    Does anyone have any ideas??

    Here is some code
    public class AddClass extends JFrame implements ActionListener{
        public AddClass() {
            initComponents();
        }//end of 1st constructor with initComp
        //initComponents
        private void initComponents() {
            getContentPane().setLayout(new java.awt.GridLayout(3, 1));
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            prodPanel.setLayout(new java.awt.GridLayout(1, 3));
            prodPanel.setBackground(new java.awt.Color(255, 255, 255));
            prodPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Production", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12)));
            westPanel.setLayout(new java.awt.GridLayout(6, 0));
            westPanel.setBackground(new java.awt.Color(255, 255, 255));
            westPanel.add(westLab1);
            westLab2.setBackground(new java.awt.Color(255, 255, 255));
            westLab2.setFont(new java.awt.Font("Arial", 1, 36));
            westLab2.setForeground(new java.awt.Color(0, 204, 0));
            westLab2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            westLab2.setIcon(new javax.swing.ImageIcon("C:\\icontexto-webdev-bullet-048x048.png"));
            westLab2.setText("MQ 35");
            westLab2.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
            westLab2.setIconTextGap(10);
            westLab2.setInheritsPopupMenu(false);
            westPanel.add(westLab2);
            westPanel.add(westLab3);
            westPanel.add(westLab4);
            westPanel.add(westLab5);
            prodPanel.add(westPanel);
            setJMenuBar(menuBar);
            setTitle("Broker Monitor");
            this.setSize(700, 700);
            BrokerWindowCloser brkWindowCloser = new BrokerWindowCloser();
            this.addWindowListener(brkWindowCloser);
            pack();
            //       setVisible(true);
        }//end of initComponents
        public AddClass(String st) {
            initComponents();
            westLab6.setVisible(true);
    //        System.out.println("in broker  " + st); 
            westLab6.setText(st);
            System.out.println(st);
            westLab6.setBackground(new java.awt.Color(255, 255, 255));
            westLab6.setFont(new java.awt.Font("Arial", 1, 36));
            westLab6.setForeground(new java.awt.Color(0, 204, 0));
            westLab6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            westLab6.setIcon(new javax.swing.ImageIcon("C:\\PNG\\icontexto-webdev-bullet-048x048.png"));
            westLab6.setEnabled(true);
            westLab6.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
            westLab6.setIconTextGap(15);
            westLab6.setInheritsPopupMenu(false);
            westPanel.add(westLab6);
    //       this.validate();
            westPanel.repaint();
        public void actionPerformed(ActionEvent ae) {
            Object source = ae.getSource();
            if(source == exitMI) {
                System.exit(0);
            }//end of if exitMI
            if(source == addMI){
                new AddMQ_1_1();
            if(source == removeMI){
                new RemoveMQ_1();
        }//end of actionPerformed
        class BrokerWindowCloser extends WindowAdapter {
            public void windowClosing(WindowEvent we) {
        }//end of windowcloserclass
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new AddClass().setVisible(true);
        }//end of main
    }// End of variables declaration
       public void addButtonActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
            Object source = evt.getSource();
            if(source == addButton){
                System.out.println("here");
                String st = mqNameJTF.getText();
                Broker1 br = new Broker1(st);
                AddClass adc = new AddClass(st);
                this.repaint();
    this.dispose();
            }//end of if addButton
        }//end addButtonActionPerformed

  • Anybody,help me. yaourt problem setting dbpath .

    when i  use yaourt ,
    yaourt -S ibus-table-wubi
    ==> WARNING: problem in pkgbuild.sh library
    problem setting dbpath '/usr/local/var/lib/pacman/' (could not find or read directory)
    problem setting dbpath '/usr/local/var/lib/pacman/' (could not find or read directory)
    problem setting dbpath '/usr/local/var/lib/pacman/' (could not find or read directory)
    help me ...

    Your problem started when you decided that compiling and installing pacman from a source tarball was a good idea. Fix that first.
    Last edited by falconindy (2011-10-14 14:17:03)

  • Problem setting JComboBox background in Nimbus

    I am having a problem setting the background component of a JComboBox when using the Nimbus L&F. The call to JComboBox.setBackground() changes the background of both the content area and the button. I do not want the background color of the button to be changed. I reviewed a number of similar posts in the forums and found a suggested change that results in the button keeping its original background. The code for the suggested change is shown below:
    JComboBox bandComboBox;
    bandComboBox.setBackground(Color.YELLOW);
    // This next line of code changes the background color of the button back to its original value
    bandComboBox.getComponent(0).setBackground(UIManager.getColor("control"));
    This change did not work for the Nimbus L&F but it did work for the Metal L&F. I really need a solution for the Nimbus L&F. Any suggestions would be greatly appreciated.
    I am currently running java 1.6_u13.
    Thanks!
    Casey

    Except for the actual arrow, the combo box arrow button doesn't paint anything in Nimbus. The highlight, the border, and the gradient background of the arrow button are drawn by the combo box painter. Hence, when you set the background color on the combo box, it also affects the look of the arrow button.
    So I thought, what if I made the arrow button opaque? Well.. it does become its own color, but it essentially becomes a giant solid-color square appended to the end of the combo box. Not exactly what we were looking for.
    So then I thought that maybe we could use the "Nimbus.Overrides" feature to override the colors on the combo box. Turns out you can't do that. The feature doesn't apply to colors. To change the base colors, you would have to go through the UIManager, and in effect change colors for all the components. Plus, the JComboBox uses colors derived from the same core color - "nimbusBase" - to paint the background of the combo box and the arrow button. So if you change "nimbusBase" to yellow then the whole combo box is still effected (although the results admittedly look better then setBackground(Color.yellow) since the gradient effects are retained).
    Anyway, after fiddling around with some ideas, this is what I came up with.
    import javax.swing.*;
    import javax.swing.UIManager.LookAndFeelInfo;
    import java.awt.Color;
    import java.awt.Graphics;
    public class Test {
        public static void main(String[] args) throws Exception {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        public static void createAndShowGUI(){
            try {
                for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
                    if ("Nimbus".equals(laf.getName())) {
                        UIManager.setLookAndFeel(laf.getClassName());
            } catch (Exception e) {
                e.printStackTrace();
            }finally {
                if(!("Nimbus".equals(UIManager.getLookAndFeel().getName()))) {
                    System.err.println("Could not find/install Nimbus LAF!");
                    System.exit(-1);
            SpecialNimbusComboBox specialBox = new SpecialNimbusComboBox(new String[] {
                "One","Two","Three"
            specialBox.boxColor ;     = Color.yellow;
            specialBox.arrowBoxColor = Color.red;
            JComboBox regularBox = new JComboBox(new String[] {
                "One","Two","Three"
            JFrame frame = new JFrame();
            frame.setLayout(new java.awt.FlowLayout());
            frame.add(specialBox);
            frame.add(regularBox);
            frame.setSize(250,150);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
        public static class SpecialNimbusComboBox extends JComboBox{
            public Color boxColor;
            public Color arrowBoxColor;
            private boolean ignoreRepaint;
            public SpecialNimbusComboBox() {}
            public SpecialNimbusComboBox(ComboBoxModel aModel) {super(aModel);}
            public SpecialNimbusComboBox(Object[] items) {super(items);}
            @Override
            public void paintComponent(Graphics g) {
                ignoreRepaint = true;
                try {
                    java.awt.Rectangle b = getComponent(0).getBounds();
                    g.setClip(0, 0, getWidth() - b.width, getHeight());
                    setBackground(boxColor);
                    super.paintComponent(g);
                    g.setClip(b.x, b.y, b.width, b.height);
                    setBackground(arrowBoxColor);
                    super.paintComponent(g);
                } finally {
                    ignoreRepaint = false;
            @Override
            public void repaint() {
                if(!ignoreRepaint)
                    super.repaint();
    }

  • Problem setting up email on new Ipad

    I have a problem setting up my email account on my new Ipad. I've checked the settings and password which are entered correctly. The Ipad error message states "Cannot Get Mail" the user name or password for "....." is incorrect. Any ideas please ??

    Problem solved. The ipad default is set to IMAP. When I changed it to a POP server, problem solved.

  • I have Mavericks on my iMac and the latest version of iPhoto 9.5.1 (902.17) but no book, card, calendar, album, slideshow, print and order prints options under Share, which still shows Set Desktop.  Any ideas please?

    I have Mavericks on my iMac and the latest version of iPhoto 9.5.1 (902.17) but no book, card, calendar, album, slideshow, print and order prints options under Share, which still shows Set Desktop.  Any ideas please?

    LN,
    Since I couldn't expand the zip file on my desktop, I expanded the file on an external drive.  Here's the information:
    Hardware Information:
              iMac (27-inch, Late 2012)
              iMac - model: iMac13,2
              1 3.4 GHz Intel Core i7 CPU: 4 cores
              8 GB RAM
    Video Information:
              NVIDIA GeForce GTX 675MX - VRAM: 1024 MB
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 1.9 - SDK 10.9
              AppleAVBAudio: Version: 2.0.0 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    Startup Items:
              NUDC: Path: /Library/StartupItems/NUDC
    System Software:
              OS X 10.9.1 (13B42) - Uptime: 0 days 0:16:52
    Disk Information:
              APPLE HDD ST1000DM003 disk0 : (1 TB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) /: 999.35 GB (698.05 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
              Apple Inc. iPod
              HGST G-Drive Mobile USB 1 TB
                        EFI (disk1s1) <not mounted>: 209.7 MB
                        iMac Backup (disk1s2) /Volumes/iMac Backup: 999.86 GB (10.14 GB free)
              Elgato Systems EyeTV Hybrid
              Apple, Inc. Keyboard Hub
                        Apple, Inc Apple Keyboard
              Apple Inc. FaceTime HD Camera (Built-in)
              Apple Inc. MacBook Air SuperDrive
              Apple Inc. BRCM20702 Hub
                        Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
              LSI Logic SYM13FW500-CDROM DRIVE 400mbit - 400mbit max
              Newer Technology, Inc. Oxford ATA Device 00 800mbit - 800mbit max
                        disk3s1 (disk3s1) <not mounted>: 32 KB
                        disk3s2 (disk3s2) <not mounted>: 29 KB
                        disk3s3 (disk3s3) <not mounted>: 29 KB
                        disk3s4 (disk3s4) <not mounted>: 29 KB
                        disk3s5 (disk3s5) <not mounted>: 29 KB
                        disk3s6 (disk3s6) <not mounted>: 262 KB
                        disk3s7 (disk3s7) <not mounted>: 262 KB
                        disk3s8 (disk3s8) <not mounted>: 262 KB
                        Media (disk3s10) /Volumes/Media: 499.97 GB (151.37 GB free)
              Newer Technology, Inc. Oxford ATA Device 00 800mbit - 800mbit max
                        EFI (disk2s1) <not mounted>: 209.7 MB
                        Mini Stack (disk2s2) /Volumes/Mini Stack: 999.86 GB (470.15 GB free)
    Thunderbolt Information:
              Apple Inc. thunderbolt_bus
                        Apple Inc. Thunderbolt to FireWire Adapter
    Kernel Extensions:
              com.AmbrosiaSW.AudioSupport          (4.1.2 - SDK 10.6)
              com.netralia.driver.VBMicDriver          (1.0.0 - SDK 10.7)
              com.netralia.driver.VBSpeakerDriver          (1.0.0 - SDK 10.7)
    Problem System Launch Daemons:
    Problem System Launch Agents:
              [failed] com.apple.accountsd.plist
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist
              [loaded] com.elgato.EyeConnect.plist
              [failed] com.google.GoogleML.plist
              [loaded] com.google.keystone.daemon.plist
              [loaded] com.microsoft.office.licensing.helper.plist
              [invalid] com.oracle.java.Helper-Tool.plist
    Launch Agents:
              [failed] com.epson.eventmanager.agent.plist
              [failed] com.google.keystone.agent.plist
              [invalid] com.oracle.java.Java-Updater.plist
    User Launch Agents:
              [loaded] com.google.Chrome.framework.plist
              [failed] com.google.GoogleContactSyncAgent.plist
    User Login Items:
              EyeTV Helper
              apple-scc-20131222-190227
              Skype
              Messages
              Thunderbird
    3rd Party Preference Panes:
              remoting_host_prefpane
              Déjà Vu
              DivX
              Flash Player
              Flip4Mac WMV
              GPGPreferences
    Internet Plug-ins::
              Shutterfly: Version: 3.0.1
              Google Earth Web Plug-in: Version: 6.2
              Default Browser: Version: 537 - SDK 10.9
              Flip4Mac WMV Plugin: Version: 3.2.0.16   - SDK 10.8
              Musicnotes: Version: 1.17.3
              OfficeLiveBrowserPlugin: Version: 12.3.5
              PandoWebInst: Version: 1.0
              FlashPlayer-10.6: Version: 12.0.0.39 - SDK 10.6
              DivXBrowserPlugin: Version: 1.4
              RealPlayer Plugin: Version: (null)
              Flash Player: Version: 12.0.0.39 - SDK 10.6 Outdated! Update
              iPhotoPhotocast: Version: 7.0
              googletalkbrowserplugin: Version: 4.9.1.16010
              QuickTime Plugin: Version: 7.7.3
              AdobePDFViewer: Version: Unknown
              Photo Center Plugin: Version: Photo Center Plugin 1.1.2.0
              Silverlight: Version: 5.1.20913.0 - SDK 10.6
              ContentUploaderPlugin: Version: 1.2
              JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Outdated! Update
    User Internet Plug-ins::
              WebEx64: Version: 1.0
              Move_Media_Player: Version: npmnqmp 071505000006
              WebEx: Version: 1.0
              MRJPlugin: Version: 1.0-JEP-0.9.0
    Bad Fonts:
              None
    Old applications:
              Audiogalaxy Helper:          Version: 3 - SDK 10.5
                        /Applications/Audiogalaxy Helper.app
              Disc Cover 3:          Version: 3.0.10 - SDK 10.5
                        /Applications/Disc Cover 3.app
              Epson Printer Utility 4:          Version: 9.14 - SDK 10.5
                        /Library/Printers/EPSON/InkjetPrinter2/Utility/UT4/Epson Printer Utility 4.app
              Keynote:          Version: 5.3 - SDK 10.5
                        /Applications/iWork '09/Keynote.app
              Kies:          Version: 2.1.0.13071_1 - SDK 10.5
                        /Applications/Kies.app
              Microsoft Alerts Daemon:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Alerts Daemon.app
              Microsoft AutoUpdate:          Version: 2.3.6 - SDK 10.4
                        /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app
              Microsoft Chart Converter:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Chart Converter.app
              Microsoft Clip Gallery:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Clip Gallery.app
              Microsoft Database Daemon:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Database Daemon.app
              Microsoft Database Utility:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Database Utility.app
              Microsoft Document Connection:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Microsoft Document Connection.app
              Microsoft Error Reporting:          Version: 2.2.9 - SDK 10.4
                        /Library/Application Support/Microsoft/MERP2.0/Microsoft Error Reporting.app
              Microsoft Excel:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Microsoft Excel.app
              Microsoft Graph:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Graph.app
              Microsoft Language Register:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Additional Tools/Microsoft Language Register/Microsoft Language Register.app
              Microsoft Office Reminders:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Office Reminders.app
              Microsoft Outlook:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Microsoft Outlook.app
              Microsoft PowerPoint:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Microsoft PowerPoint.app
              Microsoft Ship Asserts:          Version: 1.1.4 - SDK 10.4
                        /Library/Application Support/Microsoft/MERP2.0/Microsoft Ship Asserts.app
              Microsoft Upload Center:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Microsoft Upload Center.app
              Microsoft Word:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Microsoft Word.app
              My Day:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/My Day.app
              Numbers:          Version: 2.3 - SDK 10.5
                        /Applications/iWork '09/Numbers.app
              Open XML for Excel:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Open XML for Excel.app
              Pages:          Version: 4.3 - SDK 10.5
                        /Applications/iWork '09/Pages.app
              SLLauncher:          Version: 1.0 - SDK 10.5
                        /Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
              Senuti:          Version: 1.2.9 - SDK 10.5
                        /Applications/Senuti.app
              Solver:          Version: 1.0 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/Add-Ins/Solver.app
              SyncServicesAgent:          Version: 14.3.1 - SDK 10.5
                        /Applications/Microsoft Office 2011/Office/SyncServicesAgent.app
              TechTool Deluxe:          Version: 3.1.4           - SDK 10.4
                        /Applications/TechTool Deluxe.app
              TurboTax Home Business 2011:          Version: 2011.r15.011 - SDK 10.4
                        /Applications/TurboTax Home Business 2011.app
    Time Machine:
              Skip System Files: NO
              Mobile backups: OFF
              Auto backup: YES
              Volumes being backed up:
                        Macintosh HD: Disk size: 930.71 GB Disk used: 280.61 GB
              Destinations:
                        iMac Backup [Local] (Last used)
                        Total size: 931.19 GB
                        Total number of backups: 31
                        Oldest backup: 2013-12-19 05:31:29 +0000
                        Last backup: 2013-12-26 15:57:21 +0000
                        Size of backup disk: Adequate
                                  Backup size 931.19 GB > (Disk used 280.61 GB X 3)
              Time Machine details may not be accurate.
              All volumes being backed up may not be listed.
    Top Processes by CPU:
                   2%          EyeTV
                   1%          WindowServer
                   1%          Google Chrome
                   1%          EtreCheck
                   0%          AddressBookSourceSync
    Top Processes by Memory:
              328 MB          thunderbird
              213 MB          com.apple.IconServicesAgent
              205 MB          mds_stores
              197 MB          iPhoto
              164 MB          Google Chrome
    Virtual Memory Statistics:
              2.81 GB          Free RAM
              3.50 GB          Active RAM
              778 MB          Inactive RAM
              948 MB          Wired RAM
              499 MB          Page-ins
              0 B          Page-outs

  • Problems Setting Up Audio Chat between Panther and Tiger Powerbooks

    Hi,
    My pal Colin just bought a 1.67ghz Powerbook running Tiger 4.3 (I think). I'm on 1.33 ghz PB running 10.3.9. I've managed to have an audio chat once (with Ralph! ) but I don't use ichat much as most friends don't use macs. But Colin and I want to use audio chat - in common with an earlier attempt with a different friend, it isn't working. Colin's name appears in my buddy list with the green/white phone - OK. My name appears in his buddy list with a phone - OK. When we invite each other to audio chat, we get connections timing out - looks like the UDP SIP invite to (IP address):5060 isn't getting through on Colin's machine. His ichat bonjour is enabled but only mentions the two Bonjour ports, not 5060. We configured two ports to handle 5060 and 5190. Still didn't work. Do you need to restart after configuring ports in order to benefit from opening them? Or is there some other problem? Anybody got any ideas?
    Thanks in advance.
    Mark
    1.33 15" Powerbook   Mac OS X (10.3.9)  

    Hi Mark,
    Iin his Mac Firewall if On he needs:
    TCP 5190
    UDP 5060, 5190, 5678, 16384-16403
    See here for these ports and the Jabber ones an d Bonjour ones as well.
    IF he has a modem that is in default set up he may have to open the ports there as well.
    http://www.ralphjohnsuk.dsl.pipex.com/page3.html for methods and other info.
    Apple Doc on Subject http://docs.info.apple.com/article.html?artnum=93208
    NOTE: note 1 is wrong. It should read
    1. All iChat AV traffic is UDP except for ports 5190 and 5298, which need to be open for both TCP and UDP; and 5220, 5222, which need to be open for TCP only.
    Ralph

  • Problems setting up username & password for SQL

    Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
    This leads me to request help with my next biggest problem:
    Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
    I am a simple bloke, with simple thought processes, so please, go easy on me...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery1 {
         String username = "" , password = "";
         public static void main(String[] arguments) {
              PassDB UPass = new PassDB();
              String data = "jdbc:odbc:JavaTestDataBase";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
              catch (SQLException s) {
                   System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
              catch (Exception e) {
                   System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         String username = "", password = "";
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              username = uname.getText();
              password = pword.getText();
    This code generates two errors, stating:
    C:\Java_progs>javac DBQuery1.java
    DBQuery1.java:14: non-static variable username cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
    ^
    DBQuery1.java:14: non-static variable password cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
                    ^
    2 errors*****************************
    The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
    I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
    I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
    If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
    When I try & search 2 different tables, as in:
    ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
                   ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
    As always, I am extremely appreciative of any assistance you are able to offer.
    Kind regards
    duBedat
    [email protected]

    This is where I'm at now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery {
         static String username = "" ;
         static String password = "" ;
         public static void main(String[] arguments) {
         PassDB UPass = new PassDB();
         String data = "jdbc:odbc:JavaTestDataBase";
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
              Statement st = conn.createStatement();
              ResultSet rec = st.executeQuery(
              "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
              + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                   "SELECT Subject, ContactID FROM Calls "
                   + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
         catch (SQLException s) {
              System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
         catch (Exception e) {
              System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         static boolean getOut = false;
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         public PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();          
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              while(getOut == false)
                   setVisible(true);                         
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              DBQuery.username = uname.getText();
              DBQuery.password = pword.getText();
              getOut = true;               
    }          Any advice is greatly appreciated
    duBe

Maybe you are looking for

  • Installation problems on Intel Mac. claims PPC

    I'm trying to install the current Flash Player 10.2 on my Macbook 6,1 (Intel Core 2 Duo, 2.26GHz) with 4GB RAM, running OSX 10.6.6 Browser is Firefox 3.6.13 {Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3

  • 1st generation iPod

    My 1st generation iPod will not update past v3.1.3

  • Why have 24/7 chat if it is "closed"

    So I wanted to ask support a question.  Click on "Chat: 24 hours a day, 7 days a week".  Fill out the form with my issue, get to the bottom and get "Chat is currently closed.  Please choose another option" /rant.

  • Drive not ready for use

    when i go to update my ipod, i get this error: "the drive is not ready for use; it's door may be open. Please check drive\device\harddisk2\DR4 and make sure that a disk is inserted and that the driver door is closed." then it proceedes to freeze up i

  • How to intercept location URL of StageWebView

    Hello ! In my mobile application I'm using StageWebView UI object, instanciated with : myWebViewObject: StageWebView = new StageWebView; It displays content from an URL in the page, and it's sized to the screen of the device by defining attributes cl