NXOpen for Java Development Environment Construction

Source: Internet
Author: User

Purpose of writing this article

UGS has released NXOpen for Java, which can be developed in Java.
How to build an NXOpen for Java development environment for ease of use?
The specific goal is to compile an existing source code file and then execute it in the NX software environment.

 

Body

It can be built based on the previous article. In fact, the most important thing is to tell the compiler where the NXOpen for Java class library is located. Specifically, NXOpen. jar and NXOpenUF. jar. So you can modify the java-path.bat content, as shown below.

//////////////////////////////////////// /Nxopen-java.bat ////////////////////////////////////// /////

@ Echo off

Rem sets Java environment variables to facilitate Java programming

Set JAVA_HOME = C: \ Program Files \ Java \ jdk1.6.0 _ 21

Set Path = % JAVA_HOME % \ bin; % JAVA_HOME % \ .. \ jre6 \ bin; % Path %

Set CLASSPATH =.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar

Set NXOPENJARDIR = % UGII_ROOT_DIR %

Set CLASSPATH = % NXOPENJARDIR %/NXOpen. jar; % NXOPENJARDIR %/NXOpenUF. jar; % CLASSPATH %

Echo on

//// // This file is complete

The shortcut settings are the same as those above.
Now we can officially use Java for the second development of NX.

 

Test execution

However, during the compilation and execution process, I found that NX 4.0 could not run normally. The running result is as follows:

Result of nxopen for Java program running in NX 4.0

 

Fortunately, it can be run under NX 6.0.
As to why NX 4.0 cannot run, it is estimated that it is related to the version or registration license, and how to set it to run is not what I can do. Now, I can say that my goal has been achieved.

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.