Smart questions
Smart answers
Smart people
Join Eng-Tips Forums
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Eng-Tips
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

stevieda (Mechanical) (OP)
5 Jun 07 9:42
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
Helpful Member!  dagarber (Mechanical)
7 Jun 07 15:29
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.
http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

Hope this helps!

sincerely,
David Garber

Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips Fora.

dagarber (Mechanical)
7 Jun 07 15:42
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:
https://sdlc1e.sun.com/ECom/EComActionServlet;jsessionid=739D15B5AB485CAC3126FF5FBFAFDA45
(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:
http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html
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:
http://www.netbeans.info/downloads/index.php
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:
http://java.sun.com/docs/books/tutorial/getStarted/

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:
http://java.sun.com/javase/6/docs/#api
(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: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips Fora.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!

Back To Forum

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close