Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » CLASSPATH variable
CLASSPATH variable [message #759664] Tue, 29 November 2011 14:46 Go to next message
Michael Beatty is currently offline Michael BeattyFriend
Messages: 43
Registered: November 2011
Member
How to I include a CLASSPATH variable into eclipse?

When I run my Java application through Linux using "java MyClass.class", with the environment:

"CLASSPATH=/fiscal/dlc/java/util.jar:/fiscal/dlc/java/base.jar:/fiscal/dlc/java/openedge.jar:/home/mxb931/queue/java"

My application executes fine through the terminal.

However, when I try to do it through eclipse, it isn't bringing in those packages (for JDBC communication)

I've read through the documentation, it says to go through, Preferences-> Java -> Build Path -> Classpath Variables... and I added the files util.jar, base.jar, openedge.jar and the directory java (including the full path) and it doesn't work.

What am I doing wrong?

[Updated on: Tue, 29 November 2011 15:07]

Report message to a moderator

Re: CLASSPATH variable [message #759691 is a reply to message #759664] Tue, 29 November 2011 16:24 Go to previous messageGo to next message
Michael Beatty is currently offline Michael BeattyFriend
Messages: 43
Registered: November 2011
Member
Issue has been resolved.
Preferences-> Java -> Build Path -> Classpath Variables was not the correct approach.

The correct approach was to:
"Run -> Run Configurations -> Classpath (tab) -> Add External Jars
and adding the jar files here.
Re: CLASSPATH variable [message #772969 is a reply to message #759691] Sat, 31 December 2011 03:54 Go to previous message
vasudev yadav is currently offline vasudev yadavFriend
Messages: 3
Registered: December 2011
Junior Member
Hey thanks..I was facing the same problem, What u suggested worked well,
but can you explain now why java build path is used for ??
When I was using java build path I was getting warning in the marker tab that
"Classpath entry......will not be exported or published. Runtime ClassNotFoundException may result."
Ignoring warning I was getting the ClassNotFoundException .
Once again thanks Smile
Previous Topic:how to get dataset field value in script section
Next Topic:Eclipse Indigo shortcuts
Goto Forum:
  


Current Time: Thu Apr 25 10:41:46 GMT 2024

Powered by FUDForum. Page generated in 0.03076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top