I created a new "dynamic web project" in Eclipse, installed Bower
globally and then locally in the root directory of my project then hit the command bower install jquery
. It created a bower_components
folder in my project and added the jquery folder perfectly.
Here is the structure created:
I then created a new index.html
file and tried to reference that jquery
file installed with Bower
[I didn't modify any build path or anything, I actually am new to Eclipse]. The reference code is:
<head>
<script src="bower_components/jquery/src/jquery.js" type="text/javascript"></script>
</head>
When I ran that page; looking through the developer tools I kept getting the error:
GET http://localhost:8080/PolymerTrials/bower_components/jquery/src/jquery.js 404 (Not Found)
When I copy the URL in the browesr and hit enter I get:
I tried to manually add a new file named jquery.js
in my directory and copy-pasted the jquery code inside and it managed to load it correctly. But any file I add with Bower
and even though I make sure the referenced path is correct is never loaded. Again, I'm actually new to Eclipse and Bower and all this stuff, so I hope you can help. I feel that it's somehow not being included in the build. Any help is appreciated. Thanks!