Help - Only run if application is open?

I am new to scripting so I don't have much knowledge yet, but is there a way to have a script only run if an application is open. Let me explain exactly what I am doing. Basically I have a program that runs a script which tells me what song is playing in iTunes. I have the script set up fine, but the way the program works is that it checks every 10 seconds to retrieve the song info. This means that I really can't quit iTunes, because if I do, it reopens in <10 seconds because the script runs. So is there a way to add a line or two in the script to tell it to only retrieve the song info if iTunes is already open? Thanks!

This script will only say "hello" if iTunes is open. Note that if you're saving this as a stay-open application, you'll want to replace error number -128 with tell me to quit
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "System Events" to if "iTunes" is not in name of processes then error number -128 -- tell me to quit
say "hello"
</pre>

Similar Messages

  • Run Swing application without opening DOS prompt window

    is it possible to run a Swing application without opening a command interface window in MS Windows?
    thanks

    Don't know if you mean that, but if you try to call javaw.exe instead of java.exe there pops no prompt up.

  • Help! Run AIR Applications without Adobe AIR.

    Hello, I wanted to ask that is there any way to run AIR applications without having Adobe AIR in the computer. It's really annoying when you have to give someone your application to use and then the person needs Adobe AIR to run it. Any suggestions?

    Where to start...
    AIR is a lot like Java in the sense that it requires a run-time engine to be installed. This engine has all "things" required to for the application to run. In a similar way, applications such as 3DMax or Word require that the operating system be present for them to run. Those programs are written using API calls that are present within the target operating system. Likewise, AIR and Java apps are written using API calls that are present within their run-time. To bring it full circle, AIR is an application written in C, that uses APIs for the target operating system. So, when you perform certain functions within AIR, it then knows how to execute needed operating system functions (as needed). AIR also provides a lot of higher level functionality and management that make your life as a programmer a lot simpler.
    Looking at iOS or Android, we have the same thing happening. Some developers are writing apps using Objective-C (iOS) or Java (Android) that are using APIs specific to those operating systems. This is the same as writing your app in C like 3DMax.

  • Help- cannot run deployed application

    Dear all,
      I was trying to run a onlineform. I obtain following errors..any idea?
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:396)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:887)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:98)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:121)
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:341)
         ... 29 more
    Caused by: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Service call exception; nested exception is:
         java.net.SocketTimeoutException: Read timed out
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:382)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.render(PDFObject.java:3710)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:139)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
         ... 32 more
    Caused by: java.rmi.RemoteException: Service call exception; nested exception is:
         java.net.SocketTimeoutException: Read timed out
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:89)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:99)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:359)
         ... 35 more
    Caused by: java.net.SocketTimeoutException: Read timed out
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:806)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:341)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:250)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.HTTPTransport.getResponseCode(HTTPTransport.java:362)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.outputMessage(MimeHttpBinding.java:551)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1425)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:82)
         ... 37 more
    thanks

    Hi Joan,
    When you go to the Visual Administrator -> Server -> Services -> Web Services Container on the Settings tab page you should be able to see the socket timeout input field next to the HTTP Proxy settings. You can change the default value there and it will be automatically applied to all WS client proxies and logical ports deployed on the system.
    Please note that this setting affects also WebDynpro applications that use the new Adaptive Web Service model. Timeout cannot be set for WebDynpro applications using the old web service model.
    Regards,
    Arafat

  • How do I get Firefox to show hidden files and folders. It should be available under help but help only gets as far as Open Containing folder and doesn't go on to show hidden files and folders

    I am trying to find the status of Adobe Flash Player on my computer. I am advised that it exists in Firefox's hidden files and folders but I cannot find such a folder

    You have an older version of Flash installed - Shockwave Flash 10.0 r45
    You can see that for yourself in Tools > Addons > Plugins
    "Show hidden files and folders" is a function of the Operating System, not an application such as Firefox. Windows Control Panel > Folder Options > View - Advanced Settings

  • Troubleshoot is the only Help menu item that won't open and makes FFX hang even after reset

    Trying to solve why there's no sound with You tube, I headed for Help and troubleshoot. Every item on the Help menu opens, except troubleshoot. I didn't find "Help" in safe mode, so couldn't try it there.
    Reset Firefox and trouble shoot still won't open.
    And anything you add about the sound will be appreciated. It seems to come and go for reasons of itw own.

    Does the troubleshooting information page open if you type ''about:support'' into the address bar and press Enter?
    As for the sound issue,
    # Open the Windows volume mixer and make sure the global sound level is appropriate, as well as the sound level for Adobe Flash Player and Firefox. Only running applications show up in the volume mixer, so you first have to open a Flash video in Firefox to change the volume level for Flash Player.
    #* [http://windows.microsoft.com/en-US/windows7/Adjust-the-sound-level-on-your-computer Adjust the sound level on your computer | Microsoft Support]
    # Close all tabs in Firefox, then clear the cache.
    #* [[How to clear the Firefox cache]]
    # Delete cookies from youtube.com, ytimg.com and google.com
    #* [[Delete cookies to remove the information websites have stored on your computer]]
    # Delete all Flash cookies as follows.
    ## Press the Windows logo orb on the taskbar and click Control Panel.
    ## In the Control Panel search box, type ''flash''
    ## In the search results, click "Flash Player (32-bit)"
    ## Click the Storage tab.
    ## Click the Delete All button.
    ## Check "Delete All Site Data and Settings", then click the Delete button.
    # Open the following video link. Right-click the video. Does the context menu have an "About the HTML5 player" item in it? Adjust the volume in the YouTube player. Can you hear any sound?
    #* [http://www.youtube.com/watch?v=XSGBVzeBUbk&html5=1 Big Buck Bunny animation]
    # Open the following video link. Right-click the video. Does the context menu have an "About Adobe Flash Player" item in it? Adjust the volume in the YouTube player. Can you hear any sound?
    #* [https://www.youtube.com/watch?v=MGR4U7W1dZU Bastille - Things We Lost In The Fire]

  • Please help! Shared Library Error... no applications will open!

    Hi. Major issues!!
    My computer was unplugged for 2 weeks (renovations). When I set it up in my new office, none of my applications would open! (Microsoft, Adobe, AOL, etc...) Safari is working.
    I get this error message:
    The application "Photoshop" could not be launched because of a shared library error: "5<application><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "Word" could not be launched because of a shared library error:
    "8<Microsoft Word><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "AOL" could not be launched because of a shared library error:
    "9<AOL (Bootstrap)><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "AppleWorks" could not be launched because of a shared library error: "4<AppleWorks><CarbonLib><CFMPriv_SpeechRecognition>"
    Here's what I've tried...
    I have tried to install combo update 10.3.9. .. didn't work.
    My computer was purchased in 2004... just moved to a new house... do not know where my installation dvd is... so to reboot on that is not an option.
    I tried disk repair permissions... didn't work!
    I opened my log console to view the crash logs... and it appears a lot has crashed... but I can not understand what any of it means!?!
    Can anyone help or offer some advice?
    Can anyone understand a crash log if I post it?
    Please help!?! Taking an online masters course and this is a major dilemma!
    Thanks,
    Lindsay

    Hi Lindsay,
    "Can I get one from a mac store? Does it have to be the original one I used when I purchased my mac?"
    No, you can no longer purchase 10.3 Panther disks from Apple Stores, online or otherwise. You may however, be able to purchase replacement disks for your computer (if Mac OS 10.3 were the original install disks that came with your mac) by calling Apple and explaining and having the serial number ready of the computer.
    If your installation of 10.3 was an upgrade you can purchase retail copies of 10.3 disks online from many resellers, such as on ebay or sites such as FastMac, but be sure to purchase a retail box set and not upgrade or machine specific disks.
    Did you perform all of the steps that Kappy steered you to in Dr. Smoke's FAQ first and your only option left is the Archive and Install?
    littleshoulders

  • Trying to open Terminal I get;You are not authorised to run this application. The administrator has set your shell to an illegal value.

    Hi There Y'all,
    I have recently downloaded MacKeeper. It ran OK for a bit, but has recently stopped allowing Internet security updates and switching on of the internet protection options.
    Asked for help at MacKeeper. Their initial advice did not work, so a very nice technician was going to remotely attempt to fix the issue.
    He however needed/still needs access to Terminal, a to me unbeknown Utility feature of my MacBook pro with Mac OS X 10.6.8.
    While attempting to open Terminal the following came up
    You are not authorised to run this application.
    The administrator has set your shell to an illegal value.
    Did do a diskverify permission and repair and restart.
    Did check my admin settings in advanced options and have the /bin/bash.
    Any advice anyone.
    Thanks.
    in site out

    After finally localing private/etc/shells through Go>Go to folder and replacing the empty shells with the shells~orig I have permission again to open Terminal. Thanks. Another step.
    (Why though can't I access  /private/etc/...  through Finder's search?)
    Should work but the file or folder needs to exists to access it.  If you typed in /private/etc/shells and the file wasn't there there's no place to access.  Certainly /private/etc was there so that would have worked.
    So what will happen by inputting the lines
    ls -Fvl /bin/bash
    ls -Fvl /etc/shells
    more /etc/shells
    into Terminal?
    Basically to find out what you already seemed to find out.  The first command was to display owner, group, and permissions of  /bin/bash and to tell me whether it still existed.
    Similarly for /etc/shells.
    And the last command would have just displayed what was in /etc/shells.
    By the way /private/etc and /etc are the same folder.

  • Help: How can my user run my Application

    Group,
    I created a user "test1" as developer, user "test2" as end user at the same workspace TT. Then I created the application testapp1 as "test1".
    Then I login to my website http://localhost:7777/htmldb/htmldb_login as
    workspace: TT
    username: test2
    password: temppassword
    But after I login as test2, there is only one item "administrative", I do not see any applications that test1 just creaetd. How couild I make the application created by "test1" seen by "test2"? How can "test2" run the application "testapp1"?
    Thanks very much for your help.

    I think if you read the thread carefully, you'll find that it's not suggesting you give out your developer password. It's suggesting that you give your users a URL that takes users directly to the application rather than the development environment (workspace), e.g.
    http://www.myurl.com/pls/dad/f?p=101:1
    Where 101 is the application ID and 1 the page where you'd like the user to start. If authentication is required, the user will be presented with a login page. If you want a menu of applications, you'll have to create a static page with links to each application. You could also implement a menu using a public HTML DB application with a list of links.
    Sergio

  • Can someone please help, I have a dvd disk containing lecture videos, on a Windows pc it works fine, and the disk opens to the dvd menu. However on my macbook pro running Mountain Lion, it opens as a data disk, with video and audio in two seprate files??

    Can someone please help, I have a dvd disk containing lecture videos, on a Windows pc it works fine, and the disk opens to the dvd menu. However on my macbook pro running Mountain Lion, it opens as a data disk, with video and audio in two seprate files??

    You may need a 3rd party application to view the DVD in a wWindows format such as
    http://flip4mac-3.en.softonic.com/mac
    https://www.macupdate.com/app/iphone/5758/vlc-media-player

  • Downloaded the 30 day trial, but when I try to open it "Adobe application manager" opens, and nothing happens. Help!

    I've tried several times now, but every time I try to open Premiere Pro the Adobe application manager opens, and nothing more happens.

    Okay, I'm a super-noob, so please bare with me. This is what I've done so far...
    *Installed the 30 day free trial version of Premiere pro CC (2014), which led me to install "Adobe creative cloud". From there I installed Premiere Pro.
    *When I double clicked on the Premiere Pro icon after successful installation the icon only appeared briefly on my dock before it was replaced by the "Adobe application manager" icon. No new windows appeared and nothing happened.
    *I then tried to uninstall Premiere Pro, but the uninstall window looked broken. There was only "-" symbols where there was supposed to be text.
    *Since I didn't know what to click on in the uninstall "guide" I closed it down and dragged the entire Premiere Pro icon to my waste bin, and the emptied it.
    *Thought I'd try to install the trial version again, and that something might have gone wrong the first time around. When I tried that I was only redirected to the Creative cloud where the Premier Pro icon is still listed under installed apps.
    *I then tried to uninstall Creative cloud and re-installed it in hopes that it would update and let me install Premiere Pro again, but the damn thing still thinks I have Premiere pro installed.
    I'm really frustrated now, and have no idea what to try next. If adobe had some kind of phone support I'd call them, but this is the only place I have found when I try to click on support.
    Please help if you can. I'm attending a course soon where I need to have premiere pro installed on my mac.

  • Problems running Java Application. Prease Help Me!!

    I've just finished a java application to my University, I used Forte for Java and the Timer that comes with it, it works fine, but, when I try to run it from outside Forte, it's just impossible, I even create a .jar file(with Forte 4), but when I try to run it from Forte, it tells me this:
    java.lang.NoClassDefFoundError: org/netbeans/examples/lib/timerbean/TimerListener
    Exception in thread "main"
    it seems that it's a problem with the Timer, why??
    And when I try to run it from the explorer (Windows), by double clicking the file, it tells me:
    Java Virtual Machine Launcher
    Could not find the main class. Program will exit!
    But how is that possible??, it works fine with Forte. That's my problem, I need to take it to the teacher, but I can only run it from Forte now. What can I do??? Any suggestions?. I Hope that somebody can help me, please.

    This sounds like a problem with the classpath. I was facing similar error with another application. Finally I ended up unzipping the class files and putting them in a directory that was in my class path.
    Or you could explicitly specily your classpath.
    Say your application (called app) is in c:\java\app and your classes are located in c:\java\classes\ where classes is directory run it like:
    c:\java>java -cp c:\java\classes[;second path] app
    hopefully it works.
    -Chirag

  • My desktop files and folders no longer appear on the screen. I think this is a result of an iPhoto updating.  It appears (from getting info) that now Desktop is being treated like a normal file for which an application to open it must be supplied.  Help?

    My desktop files and folders no longer appear on the screen.  I think this is a result of an iPhoto updating.  It appears (from getting info) that now Desktop is being treated like a normal file for which an application to open it must be supplied.  Can anything be done?  Incila

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

  • Help me, please. generate error when i run web application

    i want you help me. I run web application on local window very well. I deploy web application success on Linux. But it generate error when run it. My web application use : struts framework, hibernate framework, tomcat 4.1, PostgreSQL 7.3 Database.
    why error generate when i run web application ?
    Thank you very much
    WARN 13-09-2006 15:51:41,674 org.apache.commons.beanutils.MethodUtils (MethodUtils.java:583) - Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.
    WARN 13-09-2006 15:53:14,880 net.sf.hibernate.cfg.Environment (Environment.java:529) - could not copy system properties. System properties will be ignored.
    WARN 13-09-2006 15:53:16,201 net.sf.hibernate.cfg.SettingsFactory (SettingsFactory.java:107) - Could not obtain connection metadata
    org.postgresql.util.PSQLException: Something unusual has occured to cause the driver to fail. Please report this exception.
         at org.postgresql.Driver.connect(Driver.java:209)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
         at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
         at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
         at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)
         at com.canhph.vietnamjob.db.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:48)
         at com.canhph.vietnamjob.dao.company.DAOJob.getHotJob(DAOJob.java:122)
         at com.canhph.vietnamjob.bussiness.company.BussinessJob.getHotJob(BussinessJob.java:74)
         at com.canhph.vietnamjob.actions.home.PortalAction.execute(PortalAction.java:230)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
         at com.canhph.vietnamjob.common.FilterCharacterEncoding.doFilter(FilterCharacterEncoding.java:53)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
         at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
         at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1023)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1000)
         at java.net.InetAddress.getAllByName0(InetAddress.java:981)
         at java.net.InetAddress.getAllByName(InetAddress.java:975)
         at java.net.InetAddress.getByName(InetAddress.java:889)
         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:114)
         at java.net.Socket.<init>(Socket.java:124)
         at org.postgresql.core.PGStream.<init>(PGStream.java:58)
         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
         at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
         at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
         at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
         at org.postgresql.Driver.connect(Driver.java:195)
         ... 54 more
    Message was edited by:
    balzacvietnam

    Sounds like the java version on your Linux machine is not working with the PostgreSQL JDBC driver.
    Try updating your JVM on the Linux server.

  • Pls Help me run bank java application

    hi i am having a error running this banking application "Bank_Application_System"
    the application is a banking system where customers can withdraw and deposit money and other functions. I downloaded it from [DOWNLOADED BANK JAVA APP|http://www.fullinterview.com/final-year-projects/article/bank_application_system-java-engineering-project-download-15509.html] But when i run it in netbeans it comes up with a error in the class Display2 saying there is a problem with "ResultsModel model;" saying it cannot find symbol also "import java.io.*;" says it is a unused import. Can somone help me pls
    package bankapplication2;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.io.*;
    public class Display2 extends JFrame //implements ActionListener
        private JLabel jlabel1;
        private JLabel jlabel2;
        private JLabel jlabel3;
        private JLabel jlabel4;
        private JLabel jlabel5;
        private JTextField NAME;
        private JTextField ACC;
        private JTextField DATE;
        private JTextField ADD;
        private JTextField AGE;
        private JTextField BALANCE;
        private JButton jbutton;
        private JPanel jpanel1;
        private JPanel jpanel2;
        private JPanel jpanel3;
        JLabel command=new JLabel();
        JScrollPane resultsPane;
        Connection connection;
        Statement statement;
        ResultsModel model;
    // more code and methods pls see link for fullcode
    void displaydeposit(String s,int i)
            String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
            String url = "jdbc:odbc:BankDatabase";
            setBounds(100,100,480,120);
            setResizable(false);
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            JButton OK = new JButton("OK");
            JLabel lable=new JLabel("Customer Database");
            lable.setToolTipText("Customer Database");
            lable.setFont(new Font("SansSerif",Font.BOLD,18));
            JPanel lpanel=new JPanel();
            lable.setForeground(Color.red);
            lpanel.setBackground(Color.orange);
            lpanel.add(lable,"Center");
            lpanel.setToolTipText("Customer Database");
           Container contentPane=getContentPane();
           contentPane.add(lpanel,"North");
           getContentPane().add(OK,BorderLayout.SOUTH);
           try
                Class.forName(driver);
                connection=DriverManager.getConnection(url);
                statement=connection.createStatement();
                model=new ResultsModel();
                JTable table=new JTable(model);
                //table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                resultsPane=new JScrollPane(table);
                getContentPane().add(resultsPane,BorderLayout.CENTER);
                if(i==1)   
                model.setResultSet(statement.executeQuery("SELECT * from DepositInfo WHERE Account_Num = '"+s+"'"));
                else if(i==2)
                model.setResultSet(statement.executeQuery("SELECT * from WithdrawInfo WHERE Account_Num = '"+s+"'"));   
                OK.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent e)
                        MainMenu mm = new MainMenu();
                        mm.menu();
                        setVisible(false);
            catch(ClassNotFoundException cnf)
                System.out.println(cnf);
            catch(SQLException sql)
                System.out.println(sql);
            pack();
            setVisible(true);
        /*private JMenuItem makeMenuItem(String name)
            JMenuItem m=new JMenuItem(name);
            m.addActionListener(this);
            return m;
        public void actionPerformed(ActionEvent evt)
              String command=evt.getActionCommand();
              if(command.equals("OK"))
                  setVisible(false);
                    MainMenu mm=new MainMenu();
                    mm.menu();
    }

    this is the error message when i run the application
    init:
    deps-clean:
    Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build
    Updating property file: C:\Users\Documents\NetBeansProjects\BankApplication2\build\built-clean.properties
    Deleting directory C:\Users\Documents\NetBeansProjects\BankApplication2\build
    clean:
    init:
    deps-jar:
    Created dir: C:\Users\\Documents\NetBeansProjects\BankApplication2\build
    Updating property file: C:\Users\Documents\NetBeansProjects\BankApplication2\build\built-jar.properties
    Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build\classes
    Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build\empty
    Compiling 8 source files to C:\Users\Documents\NetBeansProjects\BankApplication2\build\classes
    C:\Users\arinze\Documents\NetBeansProjects\BankApplication2\src\bankapplication2\Display2.java:35: cannot find symbol
    symbol  : class ResultsModel
    location: class bankapplication2.Display2
        ResultsModel model;
    C:\Users\arinze\Documents\NetBeansProjects\BankApplication2\src\bankapplication2\Display2.java:201: cannot find symbol
    symbol  : class ResultsModel
    location: class bankapplication2.Display2
                model=new ResultsModel();
    2 errors
    C:\Users\Documents\NetBeansProjects\BankApplication2\nbproject\build-impl.xml:413: The following error occurred while executing this line:
    C:\Users\Documents\NetBeansProjects\BankApplication2\nbproject\build-impl.xml:199: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 2 seconds)

Maybe you are looking for

  • Web service client timeout

    Hi, I'm trying to set a timeout on my web service client. But its not working. Your tutorials do not seem to address this. I am using weblogic 10.3.2, with Java 1.6. ============ Properties propSys = System.getProperties(); propSys.put( "weblogic.web

  • I want a new tab to open as my home page not multiple pages

    I want any new tab to open with my home page google and not multiple pages which are of no interest to me. It seems if you switch the option off you only get a blank page. If you use the add on feature it does not now work. this 'upgrade' is a nuisan

  • How do I get my contacts off my old phone onto my new?

    Just got a new iphone 5 and I cant get my contacts onto the phone. I did it, but somehow they all got erased. waaaah!!!

  • List of variables/tokens (like ${flexlib}) in mxmlc?

    hi, I sometime saw the use of special token like ${flexlib}, ${document} to specify flex library path (mxmlc or flex builder compiler options), I searched the net but can't find much info about such variables. Does anyone know where or how can I list

  • Safari keep crashing and I cant get my keys off Spanish!

    I have tried resetting Safari and clearing out the cache, it is at random times and on all web sites. I also can not get my punctuation keys off Spanish. It is driving me absolutely insane. I have tried resetting the languages, I have only Canadian a