Shop OBEX P1 Docs P2 Docs Learn Events
I'm getting an error message: [Error JVM-0031] Cannot find linked method (stamp/ — Parallax Forums

I'm getting an error message: [Error JVM-0031] Cannot find linked method (stamp/

TariskatTariskat Posts: 5
edited 2008-04-12 20:43 in General Discussion
Hello,
I had thought Freqout was a valid object in Javelin, but I could be mixing languages by accident.
I thought I had a working program to make some noise on a peizoelectric speaker, and it compiles fine in the Javelin Stamp IDE. When I try to download it to my Stamp, I get the error [noparse][[/noparse]Error JVM-0031] Cannot find linked method (stamp/core/PWM.<init>). Any ideas?

Thanks!

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-11 07:05
    Freqout is a valid class. It is located in folder ....\lib\stamp\core and extends the PWM class,
    also located in folder core.
    Do you use import stamp.core.*; in your program?

    Attach your program so I can check wether it links on my pc.

    regards peter
  • TariskatTariskat Posts: 5
    edited 2008-04-11 07:12
    Hello Peter,

    Attached is my code. Any help you can give is much appreciated.

    Thanks!
    Marie
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-11 08:10
    I downloaded your program and stored it into folder ...\Javelin Stamp IDE\Projects
    Both commands Project->Compile and Project->Link are succesful.
    You stated that works for you too.

    Then you download the program to the javelin and you get this JVM error.
    I checked the generated jemfile and it contains the PWM.<init> method.

    Are you using a Board of Education USB version or the Professional Development Board using the USB?
    If so, have you read this thread:
    http://forums.parallax.com/showthread.php?p=656527


    regards peter
  • TariskatTariskat Posts: 5
    edited 2008-04-11 15:16
    I've read that thread before when I had troubles downloading, but updating the com port actually solved my issues. I wrote the piezo_speaker program as a test several months ago, and I think it worked at the time, both downloading and running. I'm using the Javelin Stamp Demo Board, Rev A; it connects with a USB. I don't know if that's the BOE version or Professional Development board. The Project > Link is not successful for me, only the compiling. Could my PWM file be corrupted?

    Thanks,
    Marie
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-11 15:44
    The javelin demoboard has a serial connection, not usb. So you are using an
    external usb2ser cable which should be fine.
    If the command Project->Link fails then you cannot even download to the
    javelin.

    Place the program file in the folder Projects in the javelin ide installation folder.
    Then start the ide and load the program from the Projects folder.
    See if Project->Link is succesful then.

    I assume you are using winxp/vista and that you have administrator rights.

    regards peter
  • TariskatTariskat Posts: 5
    edited 2008-04-12 00:14
    I put the file in the Projects folder, and reopened the IDE and loaded it from there. I also made sure to run IDE as Administrator (I do have rights, but I'm on Vista). When I compiled it running the program as the Administrator, I got:

    [noparse][[/noparse]Java Error] piezo_speaker.java(6): Error: Type Freqout was not found
    [noparse][[/noparse]Java Error] piezo_speaker.java(6): Error: No match was found for constructor "Freqout(int, int)"

    However, when I close IDE and reload normally, using the file in the Projects folder, I get the same link error as before. I can download every other program I wrote for it, including ones that directly use the PWM class. Any other ideas?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-04-12 06:28
    Maybe the file Freqout.java is not present in the core folder.
    I attached that file here so you can save it into the core folder.

    regards peter
  • TariskatTariskat Posts: 5
    edited 2008-04-12 20:43
    Yes, that was it. I'm not sure why I didn't have that file, but I saved it off and my program links, downloads, and runs. Thank you so much!

    Marie
Sign In or Register to comment.