Eclipse not exporting libraries - eclipse

(In Eclipse) When I right click export and export as a Jar file, it does not package the libraries into the Jar file. It was exporting the libraries a couple weeks ago and the libraries were going into the Jar file and I'm not sure what changed.
I figured it was Eclipse so I reinstalled the program and imported the workspace with no luck. I also tried on a completely different machine.
I've moved the libraries into a container in Eclipse and also tried external libraries and none of the libraries are exporting. The only thing it's exporting is the class files, .claspath, .project, and the manifest.
Any suggestions would be greatly appreciated!

Of course when you post a question you've been working on (for hours) you seem to find the answer 5 minutes later...
The file was not exporting correctly because I chose "JAR file" instead of "Runnable JAR File".

Related

NetBeans 10: missing external libraries in dist/lib

I used to work with NetBeans 8 and when I used to "clean and build" my project, NetBeans used to put MyProject.jar in the directory dist/, and ALL the external libraries and projects in dist/lib/.
But recently, I've installed NetBeans 10 and after a "clean and build" only the file MyProject.jar is in dist/. I've found many discussions/blogs/etc. online to create a single jar file with all the external librairies inside, but it's not what I need.
How can I do that?
I found out that the file nbproject/build-impl.xml was really different. Hopefully, I still had this file from my former NetBeans 8 version and I replaced the new file by the old one and it works.
If someone has a better solution/explanation, I still take it.

How to change the path of a jar file imported to a Netbeans project?

i imported a jfeonix jar file into my Netbeans project while it was in my pen drive. And it worked fine while the pen drive was still plugged on.
When i removed my pen, i cannot build my project and it says that
**Could not find resource file **
Then i tried copying the jar file to my desktop and then importing it again to the libraries of my project.. It would still give the same error, and the fact i fine surprising is that it still gives the same path as it was inside my pen drive even after i imported the jar file again from the Desktop..
So i was thinking what if i can changed the path to refer the jar file manually from inside the project...
has anyone faced this problem before?
Hope someone can help me with this..
Thanks in advance
i found the answer while doing a lot of things to my project..
apparently it seems that even if we delete the jar file from the library, it somehow is still there. and that's why it gives the same path even if we import the jar file again from a different place.
here's the answer i found, just in case someone faced this
Go to Project Properties in File Menu, there under Libraries u can see all the libraries that were imported..
like shown in the above picture, the other jar files i imported previously are noted as Broken reference.. So i just removed and it did the magic =D

How do you import a Java Class Library into a Java Web project (using NetBeans)?

I've already tried the options "Add folder...", "Add Library...", and "Add JAR/Folder...", but it's not working this time -- I've done this several times before without any problems.
I've also tried to add the folder / JAR file (.war-file) manually to the projects properties in every thinkable way, but still no success.
And so far, Google hasn't helped either..
Any help would really be appreciated.
(This is for a Java Web project with JavaServer Faces, using NetBeans 7.1)
Solved: I never found out what caused the problem. I ended up re-installing entire NetBeans, and re-created (a thousand times) the project I was trying to import. And in the end, I got it working.
Put the JAR file in the WEB-INF/lib directory of your web project. All JARs in the WEB-INF/lib and all packages in WEB-INF/classes are automatically in the CLASSPATH.
Can you make "Hello, servlet" work? If not, why bother with JSF? Do a simple web app successfully and build up from there.
I had this problem with netbeans, but it seems like all the answers I found are for Eclipse (I guess am wrong) as I dont see any WEB-INF/lib directoryin NetBeans, though I have a WEB-INF directory.
so here what I did.
I remove the tomcat server on NetBeans, go to C:\apache-tomcat-7.0.30\lib , put the jstl-1.2.jar file their, restart NetBeans and add a new (Tomcat) server, create a new web app, and their, I could find the jstl-1.2.jar file in the Libraries > Apache tomcat.
and for unknown reason, it worked.!

Why are packages suddenly greyed out in Eclipse?

I have been working on an inherited webapp project and a few hours ago I exported to war file. I imported from the war file on another system (Ubuntu) and noticed all the project's packages are greyed out. Some I can expand others I can't.
Deploying the project in a container works fine, and does show the updates I made, however I can't get at the packages, or files I edited.
I have researched online and gotten no closer to an answer so far.
Any reason as to what's happening? I use Eclipse 3.7 on both systems.
A war file only contains compiled classes. You won't find your source files in a war file. That's not what it's used for.
If you want to share code and project files between two machines, use SVN, Git or another version control system. Even with 1 machine, you should use it anyway.

how to setup the sphinx with netbeans

i have successfully configured sphinx4 with eclipse.
for that these steps i have used.
copy my java and config files to SRC folder
all the necessary jar files (in the lib). the lib folder added to the root of the project
build those jar files (jsapi files too)
change the configuration file and give the proper path
test the java file
but in Netbeans i really dont understand how to do the proper steps. can someone help me. the jar files should be added to "Libraries" rite.
then after adding them how to build them.
in the netbeans it dont show a SRC folder. so all the java files and configuration files should go to Source Packages folder rite.
can someone help me with this. please
If you have sphinx4-1.0beta6 then you can just open the folder up as a netbeans project. Open netbeans, click open project, then navigate to the sphinx folder and open it. It is already a netbeans project file type as of this version. I assume this will work in later versions also. I have no clue why sphinx doesn't say this on their website.
Sphinx4 is a Java library available in OSS repository, so you can use it as any library.
If your project uses maven/gradle, add repository in your project configuration, then add dependency on two packages - sphinx4 core and sphinx4-data. The former is the main library, the latter is required if you want to recognize US English. Then just start writing the code.
If you want to rely on jar files, just download sphinx4-core and sphinx4-data files from the repository and add them as dependency to the project, then start writing code.
If you want to modify or develop sphinx4 itself, install Gradle support in your IDE, then import latest sphinx4 sources as a Gradle project.
For more details and links see the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
click on Add JAR/Folder
select jar file you want to add