BlueJ

Discussion in 'Mac Programming' started by iExpensive, Sep 2, 2011.

  1. iExpensive, Sep 2, 2011
    Last edited: Sep 2, 2011

    iExpensive macrumors 6502

    iExpensive

    Joined:
    Oct 18, 2010
    Location:
    Las Vegas
    #1
    I'm currently taking AP Computer Science II and we are using BlueJ for java programming. The program will run, then give me an error for no reason. I'm running Lion btw.

    The error is "BlueJ was unable to create a virtual machine to execute projects"

    They have info on this in there FAQ but it's for Linux

    Anyone have luck running this on a mac?
     
  2. Man9z0r macrumors regular

    Man9z0r

    Joined:
    Feb 25, 2011
    Location:
    SLO, CA
    #2
    That is interesting. I am running lion also and have had no issues with BlueJ. Although I don't like the program I use it for my java class.

    I would start by removing it from you system and try reinstalling it.
     
  3. iExpensive, Sep 2, 2011
    Last edited: Sep 2, 2011

    iExpensive thread starter macrumors 6502

    iExpensive

    Joined:
    Oct 18, 2010
    Location:
    Las Vegas
    #3
    hmm...
    Maybe I need the developer tools from apple? How do I get those if Lion was preinstalled?
     
  4. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #4
    Apple menu, App Store. It's a free download if you're running Lion.
     
  5. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #5
    S-S-Seriously?! Xcode 4 is really free? I thought you needed to be enrolled...
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    The Lion version is free. The Snow Leopard version is not.
     
  7. Wiggles42 macrumors newbie

    Joined:
    Jan 9, 2012
    #7
    @iExpensive

    did you solve your bluej problem? I have the same one and interestingly it only startet after a fresh re-install of osx lion. Before everything was fine. Xcode Dev tools are installed and java works fine besides this. Also BlueJ is enlisted in my firewall settings and connections are allowed...

    can anyone help?
     
  8. seveej macrumors 6502a

    seveej

    Joined:
    Dec 14, 2009
    Location:
    Helsinki, Finland
    #8
    Go check your Java preferences (Applications->Utilities->Java Preferences) If you have more than one release (I count 32 and 64 bit releases as one) of the runtime environment, try putting them in a different preferred order.

    EDIT: BTW, any specific reason why you're forced to running BlueJ? If you could use something else, you could also try if the problem is BlueJ-specific.
     
  9. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #9
    It's probably not BlueJ that needs to be listed in your firewall settings. The "virtual machine" it runs is probably another process altogether. Try disabling the firewall entirely first to see if it resolves the issue. If it does, you know you just have to pinpoint the proper process to "authorize" and if it doesn't, you know your issue lies elsewhere.

    The OP is probably done with his semester by now. ;) (Check the thread date).
     
  10. Wiggles42 macrumors newbie

    Joined:
    Jan 9, 2012
    #10
    Hey thx for the quick response. In the meantime my problem solved itself... but do not ask how and why. I tried it a few hours later again, this time no Error Message. Didn't even log or restart, just put it too sleep and back on again.

    I don't no if its just me, but i'm having a lot of these small issues with Lion especially with the firewall etc. Itunes e.g. always asked for permission to connect. Took me some time to solve this, too.

    But anyway, thx a lot, and btw I need BlueJ for a college course. ;)

    Cheers
     
  11. Wiggles42, Jan 10, 2012
    Last edited: Jan 10, 2012

    Wiggles42 macrumors newbie

    Joined:
    Jan 9, 2012
    #11
    Update

    In the meantime i found out how to reproduce the Error-Message "BlueJ was unable to create a virtual machine to execute projects". Turns out that my internet connection / router is causing the issue. When i cut my connection it works perfectly without any error. When i am connected elsewhere ( in this case at my university) it also works normal. Just when i'm at home and connected (with a Vodafone Easybox 803) the error pops up.


    in the bluej-debuglog.txt it says:


    Code:
    Listening for JDWP connection on address: localhost:50319
    Extra output from debug VM on launch:FATAL ERROR in native method: 
    JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
    
    Error output from debug VM on launch:ERROR: transport error 202:
     connect failed: Connection refused
    ERROR: JDWP: Failed to initialize transport via localhost:50319, 
    trying localhost via 127.0.0.1:50319
    ERROR: transport error 202: connect failed: Connection refused
    ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
    JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
     [../../../src/share/back/debugInit.c:690]

    I'm guessing that the router is somehow blocking the connection via the locahost? Dut i'm not really an expert...

    Does anyone have a clue?

    EDIT: Tried turning on/off my routers firewall - didn't do the trick.
     
  12. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #12
    Localhost, (127.0.0.1) is not related at all to your router or Internet connection. It's the local loopback address, it does not even go out to the network, the connections are purely handled in the kernel.

    Check to see if anything is already binding those ports and is preventing JDWP from doing so. You can use the netstat -an command to do so, which you can pipe into grep to filter the output (netstat -an | grep 127.0.0.1 might be a good start).
     
  13. Wiggles42 macrumors newbie

    Joined:
    Jan 9, 2012
    #13
    //Connected via WiFi, BlueJ not running

    //Connected via WiFi, while trying to start bluej --> Error Message after OsX asks me several times to accept incoming connections for the bluej.app

    //NO connection via WiFi, no bluej

    //NO connection via Wifi, bluej running.



    Not really helping, is it?
     
  14. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #14
    Disable the firewall entirely and try again. If it works, you need to trace down which process is initiating the connection to bluej.app for the JDWP (Java Debugger Wire Protocol).
     
  15. Wiggles42, Jan 10, 2012
    Last edited: Jan 13, 2012

    Wiggles42 macrumors newbie

    Joined:
    Jan 9, 2012
    #15
    Nope, still does not work. Was one of the first things i tried. (Or is there another way to turn off the firewall besides turning it off in the settings menu?)

    But hey, thank you for all your help and effort u put in this! I am really curious to find out what it is although if i can work around the issue.

    Also, isn't it weird that it only happens when i'm connected to my wifi at home and not somewhere else?

    EDIT: Turns out, it is my routers firewall. Don't know why, don't know how. But turned it off again and now everythings fine, also when i m connected.

    Thx for all the help again!

    Greetz
     

Share This Page