Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

J-Link Environment 1

Status
Not open for further replies.

stevieda

Mechanical
Jun 5, 2007
1
Hello,

I'm trying setting up the environment for the use of J-Link with Pro/E. I've read a lot of forums but nobody could help me. How do I have to set up my environment variables? Could anybody give me a brief introduction (step by step) how to test my Java environment with a simple application? Thank you very much for every kind of help!

Regards,
Stevie
 
Replies continue below

Recommended for you

Hi,

I am new to this too, but I'll give it my best explanation. Do you have the J-link user's guide? You can find it at:
<proe_loadpoint>/jlink/jlinkug.pdf

To set an environment variable on a Windows XP computer:
Click Start > Control Panel > System
Click Advanced > Environment Variables
Create a new user variable (as opposed to a system variable)
Variable name: CLASSPATH
Variable value: This will be a list of directories specific to your machine. Each directory is separated by a semicolon, the list begins with a "." and ends with "%CLASSPATH%". On my computer, it looks like this: .;C:\Java class files;C:\Circle packing\Data\ProE files;P:\ptc\proeWildfire2.0\text\java\pfc.jar;%CLASSPATH%
The first two directories are places where I keep java files, the third one is the location of pfc.jar which you must have in the list (see excerpt from J-link user's guide below).

I'm looking at page C-3 of the J-link user's guide, on setting the CLASSPATH environment variable. "If you are using the default JRE and are running J-Link applications on your machine, you need to add only your application classes to the classpath. [One] mechanism to accomplish this [is]: Setting the environment variable CLASSPATH... To compile J-Link applications the environment variable CLASSPATH must include the path to the locations of classes and archives that you intend to use. Also, you must add J-Link archive pfc.jar to the CLASSPATH. This archive is located at <ProE Loadpoint>/text/java/pfc.jar."

If you are having problems with Java itself, try the site below.

Hope this helps!

sincerely,
David Garber

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
Hi again. In case your problem is about getting started with Java (as opposed to J-link), here is an introduction I wrote to help out a friend. I am a novice to Java so I might have some things wrong, but I went through all of these steps when I was trying to get started using Java so that I could write programs to take advantage of J-link. If there are any more experienced Java/J-link users out there reading this, I would greatly appreciate any further insight that you can add to the discussion.

The basics are, you need several things:
1. the java compiler, which is called the Java Development Kit (JDK). This might include more than the compiler, but the compiler is the thing that we care about. Older versions were called Standard Development Kit (SDK), so if you hear that acronym, just assume it is an older version of the JDK.
2. the Java Run Time Environment (JRE). This lets Java run on your computer, however most computers already have a JRE on them, which lets you run applets and stuff in your web browser. They just might not have the newest one.
3. an Integrated Development Environment (IDE). With just 1 and 2 above, you can write java programs in a text editor, name them "____.java", and compile them from the command line. But an IDE makes things much much easier, and is highly recommended.
4. the Application Programming Interface (API) documentation. APIs are pre-built java classes that you can use, the documentation tells you what they are and how to use them. Very important to understand, but it is not intuitive immediately. There is also an API specific to J-link which you can find in the J-link directory on your machine.

Step one, download the JDK and JRE:
(if the link is broken, go to sun.com, mouse over "Downloads", click on Java 2 Standard Edition, click on Download for the most recent version of the JDK, and choose off-line installation)

Step two, install: double-click the icon, you probably have to choose a directory for Java to live in. The installation instructions are at:
The only important part is step 4, which tells you how to set the PATH variable. Doing this allows you to compile java programs from the command line by navigating to the directory containing the .java file and then typing: javac *.java (to compile all java files in the directory). Compiling a .java file creates one or more .class files.

Now that you've got Java working!!! we can add on the IDE, which is an integrated development environment. Doing the above means that you could write java programs in a text editor (like notepad), name them "______.java", and then compile them by running the java compiler from the command line. Doing the below will install an IDE (Netbeans is one of the most popular IDEs, and it is free), which replaces the text editor and also gives you the ability to compile directly in the IDE without using the command line. Using the IDE is highly recommended, but it is helpful to understand the above.

Step three, go to:
and download the Netbeans IDE 5.5

To get started with Netbeans, I'd recommend going through the "Getting started" tutorial on the Sun webpage:

Step four, lastly, there is one more thing you'll need, and that is the API documentation. Java has a whole bunch of pre-builts classes and together they are called the API. The API documentation documents the hierarchy of these classes and how to use them. Go here to download the documentation:
(download link is at the bototm of the page). Near the bottom there is also a link called "The Java Tutorial", basically the tutorial you started above has a whole lot more, including learning about the API. I haven't gone through it but it looks really good, the API is really hard to understand on your own.


sincerely,
David Garber

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor