Ensemble. Tofino running error unexpected Java Bridge exception Solution

Source: Internet
Author: User

As a flex development tool for Visual Studio plug-ins, Tofino of ensemble is indeed very attractive, and the total number of installation files including the compiling environment is only 122 MB, which is much higher than that of flex builder. Moreover, it is much easier for. Net programmers who are familiar with the vs development environment to use such plug-ins for flex development.

Download the installation file from the official website, and select the installation package containing the development and compilation environment for 12 Mb to download. Disable Visual Studio and enable Visual Studio after the installation is successful. Normally, the flex project appears on the page of the new project. Create a new Flex project. If the Java environment configuration of your machine is incorrect, ensemble will appear like me. tofino. plugin. support. flexjavabridgeexception: error message of unexpected Java Bridge exception (although the project is not compiled and run at this time, it will be checked out ). If you compile and run the project, the following detailed error is reported:

View plaincopy to clipboardprint?
  1. Unexpected exception: ensemble. Tofino. plugin. Support. flexjavabridgeexception: Unexpected Java Bridge exception.
  2. Tofino version: 2.2010.1.7
  3. Microsoft? Visual Studio? 2008 9.0.30729.1 built by: SP
  4. Using JVM: C: \ Program Files \ Java \ j2re1.4.2 _ 19/bin/client/JVM. dll
  5. OS: Windows XP (Microsoft Windows NT 5.1.2600 Service Pack 3) ---> system. runtime. interopservices. sehexception: An exception occurs to the external component.
  6. In ensemble. Tofino. plugin. Support. flexjavabridge. ensureinitialized ()
  7. In ensemble. Tofino. plugin. Support. flexjavabridge. invokedunlockedaction (javaaction action)
  8. --- End of the internal exception stack trace ---
  9. In ensemble. Tofino. plugin. Support. flexjavabridge. invokedunlockedaction (javaaction action)
  10. In ensemble. Tofino. plugin. Support. flexjavabridge. invokedlockedaction (javaaction action)
  11. In ensemble. Tofino. plugin. Support. flexjavabridge. startbuild (string projectdir, logcallback, progresscallback)
  12. In ensemble. Tofino. plugin. compiler. flexbuilder. Build ()
  13. In ensemble. Tofino. plugin. Project. flexproject. invokemsbuild (string target)-1 0 flexapplication1
Unexpected exception: ensemble. Tofino. plugin. Support. flexjavabridgeexception: Unexpected Java Bridge exception. Tofino version: 2.2010.1.7microsoft? Visual Studio? 2008 9.0.30729.1 built by: spusing JVM: C: \ Program Files \ Java \ j2re1.4.2 _ 19/bin/client/JVM. dllos: Windows XP (Microsoft Windows NT 5.1.2600 Service Pack 3) ---> system. runtime. interopservices. sehexception: external component exception. In ensemble. tofino. plugin. support. flexjavabridge. ensureinitialized () in ensemble. tofino. plugin. support. flexjavabridge. invokedunlockedaction (javaaction action) --- end of the internal exception stack trace --- In ensemble. tofino. plugin. support. flexjavabridge. invokedunlockedaction (javaaction) In ensemble. tofino. plugin. support. flexjavabridge. invokedlockedaction (javaaction) In ensemble. tofino. plugin. support. flexjavabridge. startbuild (string projectdir, logcallback, progresscallback) In ensemble. tofino. plugin. compiler. flexbuilder. build () in ensemble. tofino. plugin. project. flexproject. invokemsbuild (string target)-10flexapplication1

From the preceding error message, we can see that the Tofino DLL encountered an error when configuring the Java environment. Find this line:

Using JVM: C: \ Program Files \ Java \ j2re1.4.2 _ 19/bin/client/JVM. dll

The obtained result is the JRE path. The bin path in JRE is incorrect,Directory where java. dll is neededThe bin directory is missing. So how does Tofino obtain the path to the Java environment? Let me see the Tofino installation directory.

There is a JVM. config file in the sdks \ 3.2.0 \ bin directory under the Tofino installation directory. open the file and find the following content:

View plaincopy to clipboardprint?
  1. #
  2. # VM Configuration
  3. #
  4. # Where To Find JVM, if {java. Home}/JRE exists then that JVM is used
  5. # If not then it must be the path to the JRE itself
  6. #
  7. # If no java. Home is specified a VM is located by looking in these places in this
  8. # Order:
  9. #
  10. #1) java_home environment variables (same rules as Java. Home abve)
  11. #2) bin directory for Java. dll (Windows) or lib/<arch>/libjava. So (UNIX)
  12. #3) ../JRE
  13. #4) Registry (Windows only)
  14. #
  15. Java. Home =
## VM configuration## Where to find JVM, if {java.home}/jre exists then that JVM is used# if not then it must be the path to the JRE itself## If no java.home is specified a VM is located by looking in these places in this# order:##  1) JAVA_HOME environment variables (same rules as java.home above)#  2) bin directory for java.dll (windows) or lib/<ARCH>/libjava.so (unix)#  3) ../jre #  4) registry (windows only)#java.home=

The annotations have clearly stated that,Check sequence of JVM Runtime Environment:

1. Position pointed to by java_home in the environment variable;

2. Location of Java. dll (Windows) or lib/<arch>/libjava. So (UNIX;

3. JRE location;

4. Location pointed to in the configuration file (Windows ).

Java. Home = allows you to directly configure the actual JVM location, that is, the directory where java. dll is located.

Check the environment variable on my machine. The JRE pointed to by java_home is the root directory of the installation directory, and should be changed to the directory containing bin. ModifyJave_home pathFor example, c: \ Program Files \ Java \ jre6 \ bin. Restart Visual Studio, compile and run the flex project, OK, everything is normal!

If a friend reports the same error message, modify it by referring to the above content. Good luck!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.