IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Classpath Settings
kotti_raj
post May 26 2005, 06:38 AM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 26-May 05
Member No.: 862



Hi all,

Can any one please tell me how to set up classpath for JCreator, as I have classfiles under different fodler. I added this folder to the system variables classpath property.


Thanks in Advance...
Raj
Go to the top of the page
 
+Quote Post
agidden
post May 26 2005, 02:29 PM
Post #2


Member
**

Group: Members
Posts: 15
Joined: 16-March 05
Member No.: 77



QUOTE(kotti_raj @ May 26 2005, 12:38 AM)
Hi all,

Can any one please tell me how to set up classpath for JCreator, as I have classfiles under different fodler. I added this folder to the system variables classpath property.
Thanks in Advance...
Raj
[right][snapback]1678[/snapback][/right]


In general, IDE's like JCreator will not use the system CLASSPATH setting, but allow you to set the classpath for each project.
So, ensure you have a project created in JCreator and then read on.

You need to ensure your jar/class files for your project are 'included' when you compile or run.
So, based on your message, files are in different folders, and we need to add all the folders to the project classpath, along with any JAR files you will need.

After you open your project, go to Project, Project Properties in the menus.
On the project properties window, select the 'Required Libraries' tab.
Click 'New'. Enter a name you will remember, like Project Dependencies.
Click on the Add button and select Add Archive to put a JAR in the classpath.
-OR-
Click on the Add button and select Add Path to put a folder/directory and its .class files in the classpath.
Remember: the classpath will find .class files based on the folders you add. the classpath will find .JAR/.WAR files only when you explicitly add them.
So, adding the folder c:\foo to the project classpath will not pickup the file c:\foo\project.jar - you have to add it as well as the folder.
Adding the folder c:\foo to the project will pickup the file c:\foo\file.class.

This should put you on the right track.
To check, you should see the classpath in the output area when you try to compile your code. If something is wrong or missing, the Project Properties window is where you set it.

Good luck.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 31st July 2010 - 11:57 AM