MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sitomania
Post subject: I canīt add .class files to my project  PostPosted: Jul 14, 2003 - 04:48 PM



Joined: Jul 10, 2003
Posts: 31

Hello ( again ),

I have a problem that it is driving me crazy.

I have a folder with serveral classes that have to be accessed in runtime, so I added the folder to the windows classpath but it does not work with eclipse. I tested with a notepad java program and i worked fine.
The next step was to add it to the project and then :
add to the build classpath : didnt work
add to the .classpath: did not work
create a jar and placed it on the web inf: did not work
place the folder in the web inf folder: did not work
....
Please help!!!!!!!

thanks in advance!!

sitomania
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Jul 14, 2003 - 05:41 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6760

From the post, it sounds like you're new to Eclipse, not just MyEclipse. Eclipse has a lot to offer, but it operates differently than other IDE's with which you might be familiar. For example, it doesn't use anything on the Window's classpath. Before you become frustated with these types of issues, I'd highly recommend that you take a few minutes and read the "Java Developement User Guide". You can access it at Help->Help Contents->Java Development User Guide.

After that, please read the up to date MyEclipse web project setup and debugging tutorial at http://myeclipseide.com/enterpriseworkbench/help/index.jsp

We'll still help you, but you need to begin by helping yourself first. :-)

Now, for your question:

Quote:

create a jar and placed it on the web inf: did not work
place the folder in the web inf folder: did not work


To add class files to the path of a web project you can choose to do one of two things. You can create a jar archive of the class files and place the jar in the WEB-INF/lib directory of your web project. Alternatively, you can add the java source files into the source folder for your web project and when they're compiled they'll be placed in WEB-INF/classes. Either way will work, the difference being whether or not you have access to the source.

--Scott
MyEclipse Support

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
wk5657
Post subject:   PostPosted: Jul 14, 2003 - 06:04 PM
Registered Member
Registered Member


Joined: Jun 17, 2003
Posts: 88

scott wrote:
From the post, it sounds like you're new to Eclipse, not just MyEclipse. Eclipse has a lot to offer, but it operates differently than other IDE's with which you might be familiar. For example, it doesn't use anything on the Window's classpath. Before you become frustated with these types of issues, I'd highly recommend that you take a few minutes and read the "Java Developement User Guide". You can access it at Help->Help Contents->Java Development User Guide.

After that, please read the up to date MyEclipse web project setup and debugging tutorial at http://myeclipseide.com/enterpriseworkbench/help/index.jsp

We'll still help you, but you need to begin by helping yourself first. :-)

Now, for your question:

Quote:

create a jar and placed it on the web inf: did not work
place the folder in the web inf folder: did not work


To add class files to the path of a web project you can choose to do one of two things. You can create a jar archive of the class files and place the jar in the WEB-INF/lib directory of your web project. Alternatively, you can add the java source files into the source folder for your web project and when they're compiled they'll be placed in WEB-INF/classes. Either way will work, the difference being whether or not you have access to the source.

--Scott
MyEclipse Support
It should also be noted that the folder structure of the class files and the jar file need to reflect the package declaration of the java classes.

Wayne
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
sitomania
Post subject:   PostPosted: Jul 15, 2003 - 08:55 AM



Joined: Jul 10, 2003
Posts: 31

Hello,
I have a jar where I put all the classes I need taking care of keep the directory struture but it does not work. Should I name the jar file with a special name? Or should I add the jar to some kind of classpath ? I need to access the classes of this jar in runtime
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
sitomania
Post subject:   PostPosted: Jul 15, 2003 - 09:26 AM



Joined: Jul 10, 2003
Posts: 31

Ok it works,
thansks for your help!
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits