Ensemble.tofino Run the error unexpected Java Bridge exception solution

Source: Internet
Author: User
Tags stack trace visual studio

As a flex development tool for Visual Studio Plug-ins, the ensemble company's Tofino is really attractive, and the installation files that contain the compilation environment are 122M in total, compared to flex Builder. Moreover, for a. NET programmer who is familiar with the VS development environment, it is much easier to use such plug-ins for flex development.

Download the installation files from the official website and choose 122M installation package download containing the development and compilation environment. Close Visual Studio and open Visual Studio after the installation is successful, and the Flex project will normally appear on the page of the new project. Create a new Flex project, if your machine's Java environment is not configured correctly, it will appear like me, Ensemble.Tofino.Plugin.Support.FlexJavaBridgeException:Unexpected Java Bridge exception error Prompt (although there is no compilation running the project at this time, but will be checked out). If the build runs the project, the following detailed error will be reported:

Unexpected exception:Ensemble.Tofino.Plugin.Support.FlexJavaBridgeException:Unexpected Java Bridge exception.
Tofino version:2.2010.1.7
Microsoft? Visual Studio? 2008 9.0.30729.1 built BY:SP
Using Jvm:c:\program Files\java\j2re1.4.2_19/bin/client/jvm.dll
Os:windows XP (Microsoft Windows NT 5.1.2600 Service Pack 3)---> System.Runtime.InteropServices.SEHException: External components vary Often.
In Ensemble.Tofino.Plugin.Support.FlexJavaBridge.EnsureInitialized ()
In Ensemble.Tofino.Plugin.Support.FlexJavaBridge.InvokedUnLockedAction (javaaction action)
---the end of the inner exception stack trace---
In Ensemble.Tofino.Plugin.Support.FlexJavaBridge.InvokedUnLockedAction (javaaction action)
In Ensemble.Tofino.Plugin.Support.FlexJavaBridge.InvokedLockedAction (javaaction action)
In Ensemble.Tofino.Plugin.Support.FlexJavaBridge.StartBuild (String ProjectDir, Logcallback Logcallback, Progresscallback progresscallback)
In Ensemble.Tofino.Plugin.Compiler.FlexBuilder.Build ()
In Ensemble.Tofino.Plugin.Project.FlexProject.InvokeMsBuild (String target)-1 0 FlexApplication1

As you can see from the error message above, it is a Tofino DLL that has an error configuring the Java environment to find this line:

Using Jvm:c:\program Files\java\j2re1.4.2_19/bin/client/jvm.dll

The path to the JRE is taken, it should be the bin path error in the JRE, the directory where Java.dll resides, and the bin directory is missing. How does Tofino get to the path to the Java environment? Let me see the installation directory for Tofino.

In the Sdks\3.2.0\bin directory under the Tofino installation directory, there is a jvm.config file that opens to find the following:

#
# 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=

It is clear from the comments that the sequence of checks for the JVM's operating environment is:

1. Position of java_home in environment variable;

Location of 2.java.dll (Windows) or lib/<arch>/libjava.so (Unix);

3.jre position;

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

Java.home= can directly configure the actual location of the JVM, that is, the directory where Java.dll resides.

To view the environment variables on my machine, the java_home point to the JRE is the root of the installation directory and should be changed to a directory containing bin. Modify the Jave_home path, such as C:\Program Files\java\jre6\bin. Restart visual Studio, compile and run the Flex project, OK, everything's fine!

If a friend encounters the same error message, refer to the above content modification can be. Good luck to all of you!

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.