‘Web App Library’ folder missing in Eclipse - eclipse

In my dynamic web page under Libraries, I’m missing ‘Web App Library’. I tried right clicking on my project -> java build path -> removed ‘Web App Libraries’ -> add library ‘Web App Libraries’, but nothing shows under the library.
The ‘Web App Libraries’ will show in the Java build path.'Java Build Path'
but not under the Libary folder. image01
I am trying to set up mysql-connector-java in WEB-INF / lib. Like this image02. This is also the correct build path I am trying to do image03.
Thanks !

You have to add the Libraries under the library folder by yourself. Try drag drop or Add JAR/Folder option.

Related

Eclipse - Adding a Jar File to a existing Project

I am running Eclipse 3.7. I am currently working on a Plug-In Project for a Application called Team Center. I was recently made aware of a jar file of SWT Widgets named Opal. So I am trying to figure out how to add the Jar File to my existing project. I have tried many different ways to do this. Nothing has worked so far.
Here are some of the things I have tried.
Made a lib directory in my current project copied the jar file
Build Path Configure -> Libraries -> Added the Jar
Runtime tab -> Add -> selected the lib/jar file -> update build path
Saved
My project still compiles, but at runtime it fails and I get can't load proxied handler errors
I have tried to create a plugin project just for the Jar File, then add the opal plugin to required Plug-ins. If the Opal project is closed, that reflects with the Opal plugin in my project.
Here is the way my current project works. It is a plug-in project and when I finish or change code.
Build Project
Export
Deployable plug-ins and fragments
Select my project plug-in
Finish
Then I copy the project.jar to the TeamCenter Application plug-ins directory
I am assuming that somehow I have to include the opal.jar in the project.jar. But right now I am at a total lost on how to do it.
In Eclipse Plugin Project click on your MANIFEST.MF file and go to the runtime tab. There should be a section "Classpath". Try to add your lib there.
UPDATE
I've tried it and it has worked for me. I've executed following steps:
create new Plug-In project
create new lib folder in it
copy opal lib to the folder
open the MANIFEST.MF, go to the Runtime tab and add the lib to the Classpath section
check whether the lib folder is recognized of the build process (Build tab and lib folder should be checked)
Create new Run Configuration (Run -> Run Configuration... -> double click on OSGi Framework)
on Bundles tab check the new made project (Workspace section) and uncheck Target Platform for now
mark the new project and click on the button Add Required Bundles on the right side
now some needed bundles to run your project should be checked in the Target Platform section
click Apply, then Run and your OSGi env will be started
check build.properties in your plugin. check lib folder should be included there.
open plugin.xml or MANIFEST.MF in editor, you see build Tab. In the binary build, make sure your lib folder is checked.

how to include static library into another Project

I am using Xcode 4.2.1.
I do have a static library libSignatureLibrary.a (which is 58k in memory)!
and I Created a new project SingleViewBased and open Link Binary With Libraries click '+' added libSignatureLibrary.a which is stored at desktop i added in the application.
I open Target Dependencies Click '+' i can't see the libSignatureLibrary.a library into my project!
I don't know where i did the mistake!
Can any one give me solution to fix this issue.
Its simple,just copy this libSignatureLibrary.a physically to your project folder and from there just add it your project.It will work.

How to Compile Eclipse Project without 'res' directory

I have one Android Eclipse project without 'res' directory in it.
It have only one file which is an common service, and i don't need the resource for this project.
So how can I tell eclipse that i don't need resources for this project.
Right click your project -> Properties. Then Java Build Path -> Source, select the res entry and click Remove.
You can just delete the folder assuming you are not using anything in the resources folder such as values, layouts, or images - this includes your application icons.
To delete the folder just right click it and delete it and make sure it is not in your Build Path.
You will not be able to get rid of the gen folder however, as Android build this dynamically since it is accessed through the SDK.

Configure the build path in eclipse for Spring MVC Step-By-Step Tutorial

I begun this Spring MVC Step-By-Step Tutorial part 1 at 1.8 it says
"If you are using an IDE, you will want to configure your project's build path by adding the jars from the 'lib' directory. You will also want to add servlet-api.jar from your servlet container's 'lib' directory ('${appserver.lib}'). Adding these to your build path should successfully resolve all the import statements in the 'HelloController.java' file."
I add jars in the 'lib' folder but the issues does not solves. I could not figure out how to configure the build path. Can any one help. Thanks
Right-click on your project root and select Build Path -> Configure Build Path.... Select the Libraries -tab and click Add JARs.... Navigate to your projects' lib-folder and select the .jar -files, then click Ok.
Edit:
From the comment below:
can I define the library once and for every project I just mention the
path
If you have multiple projects that use the same jar-archive or archives, you can define a User library for your Eclipse-installation: Select Window -> Preferences, then Java -> Build Path -> User Libraries. Click New, give a name to your user library and click Ok. Select the User library you just added, and click Add JARs..., navigate to the jar you want to add to the library and click Ok. Note that single User library can contain multiple jars (such as all needed Spring-jars, like core, webmvc, tx...), so you can keep repeating the Add JARs... -step.
When you want to use the defined user library in your project, go to the Libraries -tab in your projects' Build Path, and click Add Library, then select User Library and click Next. Now you can pick the library from your user libraries you've defined.

How to change Liferay Portlet Plugin API library in Eclipse?

I have switched my web-application to run on another installtion of Liferay. Consequently, I was able to changle classpath libraries in my project to new server location. This includes JRE System Library and Liferay v6.0 CE. I.e, both these libraries can be added for new server location from Java Build Path dialog.
But the library "Liferay Portlet Plugin API" still refers old Liferay installation path and I see no way to change it.
How is it possible?
UPDATE 1
Here: http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial
On the very most low picture you can see all three libraries listed in Package Explorer. Two of them I was able to change and the question is about third one.
You can manually change file .metadata\.plugins\org.eclipse.jdt.core\variablesAndContainers.dat.
So open your filesystem browswer (My computer) navigate to your liferay IDE workspace location and go to .metadata\.plugins\org.eclipse.jdt.core. Open file variablesAndContainers.dat and find and edit your jars locations.
After that restart Liferay IDE or simply close and open your project.
UPDATE:
1) Take note of jars that are needed
2) Go to configure build path dialogue than go to libraries and select "Liferay Portlet Plugin API" then click Remove
3) Create folder "lib" directly in your project (not WEB-INF/lib)
4) Add jars to lib folder (from 1.)
5) Select jars and add them to build path (right click - Build path - add to build path)
Or you can crete you User libarary with those jars and than add it to build path
Additionally to chosing correct libraries in classpath dialog, one should also change "target runtime" appropriatedly by right click project and going to properties > Targeted Runtimes.
P.S. And plus one should close project and then open it again.
in my case, following instructions in this question about clearing eclipse cache (-clear option) helped, as changing liferay plugins SDK path wouldn't change the libraries' locations when adding this library to project build path...