webMathematica Technical FAQs Services & Resources / webMathematica
-----
 /
All Platforms
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

자바이벤트핸들러에서 매쓰매티카로의 콜이 hang 하는 이유는?

자바 유저인터페이스에서 매쓰매티카를 부를때는 반드시 tdLink.requestTransaction() 를 통해 허가를 먼저 받아야 합니다. 유저가이드의 Part 1 → Writing Your Own Installable Java Classes → Writing Your Own Event Handler Code 을 참고하여 주십시요.

항상 아래와 같이 하시면 안전합니다.

StdLink.requestTransaction(); synchronized (ml) { ... use the link ... }

매쓰매티카를 콜하는 자바코드에 위의 라인을 넣어 주시면 편리합니다.

StdLink.requestTransaction() 는 딱 한가지 경우에만 필요합니다: 자바가 매쓰매티카의 InstallJava 명령을 이용하여 구동되었으며 매쓰매티카에서 자바로 콜하는 중이 아닌 경우입니다.

일반적으로 이런 경우는 유저가 자바에서 매쓰매티카를 콜하는 경우입니다.

그러나 StdLink.requestTransaction() 은 어느경우에나 사용하셔도 됩니다.

따라서 코드를 직접 작성하시는 경우는 항상 StdLink.requestTransaction() 함수를 콜하여 주십시요.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [en] [ja]