Application works from NB but not from jar

Hi,
I'am programming a game in JAVA and this going as planned. Everything works when I run it from NetBeans, but when I execute the jar file from the console, then I get hunderds of the same exception.
I really don't know what it is, I see a NoSuchMethod exception in the MouseEvent of the method getLocationOnScreen(), but just as i said, the app works fine without errors from out NB.
Does somebody knows what the problem is?
thx Sven
java -jar Hotel.jar
Loading board images.
Loading image: /Images/bg-patern-hotel.jpg
Opening file /Images/bg-patern-hotel.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/bg-patern-hotel.jpg]
Loading image: /Images/Main-board-big.jpg
Opening file /Images/Main-board-big.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/Main-board-big.jpg]
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: java.awt.event.MouseEvent.getLocationOnScreen()Ljava/awt/Point;
     at Engine.GameAction.setMousePos(GameAction.java:137)
     at Engine.InputManager.mouseMoved(InputManager.java:277)
     at java.awt.Component.processMouseMotionEvent(Component.java:5647)
     at java.awt.Component.processEvent(Component.java:5371)
     at java.awt.Container.processEvent(Container.java:2010)
     at java.awt.Window.processEvent(Window.java:1184)
     at java.awt.Component.dispatchEventImpl(Component.java:4068)
     at java.awt.Container.dispatchEventImpl(Container.java:2068)
     at java.awt.Window.dispatchEventImpl(Window.java:1801)
     at java.awt.Component.dispatchEvent(Component.java:3903)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Same error goes 50 times more.Edited by: Svenmeister on Apr 16, 2010 7:22 AM
Edited by: Svenmeister on Apr 16, 2010 7:22 AM

Ok, I updated my Mac but still got the 1.5.0_22 crap so I changed the function from the mouseEvent to one that 1.5 supports.
But now when I run the application from the console the Exception about the mouse function is gone, but I got another exception instead of it. And this one is I believe not JRE version relevant.
The error is in the loading of the images, at the third PNG image to be precise. The images are now in total 10.8MB in size.
So is this also a 1.6 thing? Would be awesome if someone can explain it.
java -jar Hotel.jar Loading board images.
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
     at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
     at java.awt.image.Raster.createPackedRaster(Raster.java:458)
     at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
     at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
     at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:469)
     at apple.awt.OSXImageRepresentation.setPixels(OSXImageRepresentation.java:66)
     at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
     at sun.awt.image.PNGImageDecoder.sendPixels(PNGImageDecoder.java:498)
     at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:419)
     at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
     at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
     at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
     at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
     at java.awt.image.Raster.createPackedRaster(Raster.java:458)
     at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
     at java.awt.image.BufferedImage.<init>(BufferedImage.java:345)
     at apple.awt.CGraphicsConfig.createCompatibleImage(CGraphicsConfig.java:174)
     at GUI.Board.toBufferedImage(Board.java:1472)
     at GUI.Board.loadImages(Board.java:1143)
     at Engine.HotelMain.switchState(HotelMain.java:86)
     at Engine.HotelMain.<init>(HotelMain.java:57)
     at Engine.HotelMain.main(HotelMain.java:194)Edited by: Svenmeister on Apr 16, 2010 11:01 AM

Similar Messages

  • Custom F4 help in a BSP application working in Mozilla but not in IE

    Hi,
    I have created a custom F4 help in a BSP application.
    It is working in Mozilla but not in IE. I tried enabling javascript as well but still it is not working.
    Can someone please suggest a possible solution for this?

    Hi,
    See simmilar discussion in thread /thread/1883519 [original link is broken]
    I think this may be helpful for you.
    Thanks,
    Chandra

  • Application working under NetBeans but not as a *.jar file

    Hello,
    recently I found a little problem. I wrote application that shows all available ports in my computer. When I am running this applications under NetBeans it works with no problem - finds all available ports. Then I am building it to the *.jar file. Application is working with no problem but command:
    Enumeration PortIds = CommPortIdentifier.getPortIdentifiers();
    is not returning any identifiers - PortIds is empty.
    Anyone knows a solution for this type of problems? Thanks

    Hi Venkatesh,
    Few questions.
    1. What is your JDeveloper version? (Always better to post your JDev version along with the question, which would help us to help you better).
    2. Did you try adding webserviceclient.jar to the classpath? (Search in your JDev installation directory for the location of this jar file).
    -Arun

  • Application works in jdeveloper but not as standalone jar file

    Hi All
    We have developed an application using BI Publisher APIs,it works as expected through JDevelper,however when I try to deploy it to a jar file a run it through command line it gives me No class found exception for
    javax/xml/rpc/Service class factory.. thinking that the class is not present.I have extracted the jar file but could find the class file in the expected directory........anyhelp would greatly be appreciated.
    Regards
    Venkatesh

    Hi Venkatesh,
    Few questions.
    1. What is your JDeveloper version? (Always better to post your JDev version along with the question, which would help us to help you better).
    2. Did you try adding webserviceclient.jar to the classpath? (Search in your JDev installation directory for the location of this jar file).
    -Arun

  • Application works no WTK but not on phone

    I created a very simple application, with a form, some textfields, nothing fancy, no images, no menus, etc.
    It works fine on the WTK simulator, and it installs on the phone, but when I execute it I get "Application Error" and it doesn't even open.
    I'm manually creating the JAR file... is there anything I should add to it? I'm using the manifest file created by WTK and the class file (only one).

    Hey thanks mate.
    I have posted my code in other thread if you would like to have a look at it.
    I m using 3G to access my webserver. Oh yeah, I m using pure HTTP and not WAP-HTTP since I have changed the configuration.
    But, as I said previously I had no problems doing the samething from the same device although I didnt send any data, just something like pinging the web server and getting a reply in form of say " works1","works2" and so on....
    Ok, I will have a look at device config. data sheet.
    Thanks for your reply

  • Application works in emulator but not on real device

    Hi Everyone,
    I have been trying to build this application and avail users to download it from a WAP page.
    Now, initially for testing purpose I managed to transfer it on my mobile device which is a Sony Ericsson Z800 using a data cable.
    The application downloads 2 images from an Apache Tomcat web server and displays it on user screen. I have created this application using MIDP 2.0. I managed to install it on my mobile device and now when I m trying to send request to the server I wont get any response ? The request itself is not reaching to the web server.
    Strangely it works when I give a static path from my mobile browser like: http://xxx.xxx.xxx.xxx:8080/servlet?param1=x&param2=y but when the same path is accessed from installed application it wont work :-(. Its a static IP so there is no problem with changing of IP Address.
    Please note that I have transferred only the jar file. Does that make any difference ?
    Please guide me as to where I m going wrong..
    Regards

    Hey thanks mate.
    I have posted my code in other thread if you would like to have a look at it.
    I m using 3G to access my webserver. Oh yeah, I m using pure HTTP and not WAP-HTTP since I have changed the configuration.
    But, as I said previously I had no problems doing the samething from the same device although I didnt send any data, just something like pinging the web server and getting a reply in form of say " works1","works2" and so on....
    Ok, I will have a look at device config. data sheet.
    Thanks for your reply

  • We had migrated our servers from a domain to cloud. all the web applications working fine locally, but from outside they are accessible but on editing giving 404 with some request id.

    hi all,
    recently we migrated our moss 2007 from a domain to cloud env. everything goes well and all the application working fine locally.
    but when users are trying from outside first they get promt for basic auth, that is enabled, its fine. then servers serve first page smoothly. all the application browsing is fine. but when authorized users are trying to edit a web page and they click on
    anything(save, submit for publication, publish) they get 404 with a request ID. another thing if they add a new page to app and then make any changes to that page then they are not getting any issue.
    please help if any one resolved that kind of issue.
    thanks in advance.
    SJ

    Hi Sumanpreet,
    Thanks for posting your issue, Kindly check out below mentioned URLs to get the fix for this issue
    http://www.sharepointdiary.com/2011/02/404-page-not-found-error-sharepoint-2010-migration.html#ixzz2jHyVIFcX
    http://vasya10.wordpress.com/category/sharepoint-2010/sharepoint-2007-to-2010-migration/
    https://social.technet.microsoft.com/Forums/en-US/d80e7495-e889-4209-9a0a-82a852c944b1/after-migration-from-moss-2007-to-sharepoint-2010-i-tried-to-check-the-site-with-site-url-getting?forum=sharepointadmin
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

  • Can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    See http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • Paste image from clipboard works in Chrome but not in Firefox

    Hi there,
    I would like to know a bit more about the technical reasons why image pasting from clipboard works on Chrome but not Firefox.
    Steps to reproduce:
    1. Open the text editor on github.com, e.g. by commenting on an issue
    2. Copy an image to clipboard
    3. Put the mouse cursor into the text editor area
    4. Use CTRL+V to paste the image into the text editor
    On Chrome, the image is pasted and automatically uploaded on Github. On Firefox nothing happens.
    Can someone please shed light on this lacking feature?
    I would so much love to see support for this on Firefox as it is a very convenient functionality.
    Thank you!

    The best is to try it yourself I guess.
    Go to Github and try pasting an image into the compose editor.
    The editor definitely supports image pastings. They work directly in Chrome(ium).
    Thus I am wondering why Firefox does not support direct pasting from clipboard into the editor.
    See the attached screenshot regarding the editor I am talking about.

  • Medical app from Intuit works in IE, but not Firefox.

    Encrypted medical app works in new IE, but not Firefox. Everything works down to the end, and click on "continue" and nothing happens. A tech and I have spent hours on this. Did not work on FF5 or 6. Did not work on old IE, but did on fresh new version with no data files copied in.

    If it works in IE but not FF, then it has nothing to do with the mp3s. More likely it's because of the HTML on the page.
    To start, page is missing DOCTYPE declaration... a MAJOR problem. The DOCTYPE declares which set of rules the browser will use to display the page. Without it, different browsers go crazy or do not work at all.
    http://www.w3schools.com/tags/tag_DOCTYPE.asp
    Validate the html code here:
    http://validator.w3.org/
    You will have to fix all the errors if you want this to work in all browsers.
    Best wishes,
    Adninjastrator

  • How do I get the audio playback from the source monitor to work? I have the trial version of the latest premiere and the audio works in that but not cs6

    I have the trial version of the latest premiere and the audio works in that but not cs6

    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840
    -especially your sound hardware, and the details of your video

  • Password works for login but not for the Adobe CC Desktop application

    Password works for login but not for the Adobe CC Desktop application

    Please refer to http://helpx.adobe.com/creative-cloud/kb/troubleshoot-cc-installation-download.html
    ou can try deleting OPM.DB from steps below and try again.
    Mac OS: You can locate the OPM.db file in the \User\\Library\Application Support\Adobe\OOBE folder. To access the hidden user Library folder, see Access hidden user library files | Mac OS 10.7 Lion. - http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-f iles.html
    Windows: You can locate the OPM.db file in the :\Users\\AppData\Local\Adobe\OOBE folder.  To view the hidden AppData folder, see Show hidden files, folders, filename extensions | Windows XP, Vista, Windows 7. -http://helpx.adobe.com/x-productkb/global/show-hidden-files-folders-ex tensions.html
    3) update to the latest version of the Creative Cloud app.
    Also we would like few more details:
    When has this issue started occurring, was this after installation of any specific adobe product.
    On which platform are you seeing this.
    Also we would like to know if after above steps this issue occurs ever again in future.
    You can refer to http://forums.adobe.com/thread/1239510
    Regards,
    Rajshree

  • Works on emulators but not on mobile devices

    Hello,
    My project works on emulators but not on mobile devices (no image and on Samsung it says "unsupported file").
    Please help, I don't know what to do. My configurations: MIDP 2.1, CLDC 1.1.
    Thanks in advance.
    Edited by: Vitali.pom on Oct 27, 2011 12:01 PM

    Edit: I succeeded to solve it accidentally. I did the following: Sign the jar in Netbeans, clean and build, the jar didn't work, I wiped out the .ks from the jar and clean and build again. Now it worked.
    Edited by: Vitali.pom on Oct 30, 2011 1:28 AM

  • Java works on chrome but not on firefox

    Java works on Chrome but not Firefox. I've uninstalled and reinstalled Firefox. Chacked all appropriate boxes in Control Panel. Deleted JavaReg.Dat. Enabled plugin. Uninstalled all Java from my computer and reinstalled. Cleared Firefox Cache. No luck.

    Do you see the Java plugin in Tools > Add-ons > Plugins ?
    Firefox is a 32 bit application, so you need to install the 32 bit Java version.
    See Java Platform > Java SE 7U5 or Java 6U33 (Downoad JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

Maybe you are looking for

  • Msg=JBO-26061: Error while opening JDBC connection

    I developed an application connecting to a database and the application worked fine. After that I moved the tables into the different database user and server. I opened the application in JDeveloper and I configured the new Database connection and Ne

  • Satellite P850-31L thinks Intel HD GPU driver is old after Win 8.1 upgrade

    Hi there, I have had my Satellite P850-31L since last year and recently updated to windows 8.1. This laptop has a NVIDIA GeForce GT 640M graphics card and it use to say that on my dxdiag. Since updating to windows 8.1 my laptop seems to think I have

  • This script is not checking the existing of the new created item

    Dear Friends I have This script is not checking the existing of the new created item I am using this script in side WHEN-BUTTON-PRESSED trigger I am using oracle Forms [32 Bit] Version 6.0.8.11.3 (Production) My script as the following : BEGIN BEGIN

  • Photosmart 7520 - error code 0x61011beb makes alot of noise and will not print!!!!

    I am at the year mark with this print. It has only been used about five times. I tried to use it one day and recieved an error message 0x61011beb. The printer is making alot of noise like its moving the ink over too far and do not know when to stop i

  • Current Day EBS

    Hello SAP Friends, I need help on Current Day Bank Statement. Appreciate your input/help/opinion. My client wants to update Current day bank statement to G/L and Sub-Ledger so that any electronic payment received from customer updated in real-time. A