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?
- 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: An exception occurs to the external component.
- 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 action)
- In ensemble. Tofino. plugin. Support. flexjavabridge. invokedlockedaction (javaaction action)
- 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)-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?
- #
- # 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 abve)
- #2) bin directory for Java. dll (Windows) or lib/<arch>/libjava. So (UNIX)
- #3) ../JRE
- #4) Registry (Windows only)
- #
- 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!