- This topic has 4 replies, 3 voices, and was last updated 21 years, 4 months ago by sitomania.
-
AuthorPosts
-
sitomaniaMemberHello ( 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
Scott AndersonParticipantFrom 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:
create a jar and placed it on the web inf: did not work
place the folder in the web inf folder: did not workTo 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
Wayne KiddMember@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:
create a jar and placed it on the web inf: did not work
place the folder in the web inf folder: did not workTo 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 SupportIt 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
sitomaniaMemberHello,
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
sitomaniaMemberOk it works,
thansks for your help! -
AuthorPosts