How to get the bin folder in eclipse - eclipse

I am searching for the bin folder in eclipse, but I am not able to find it.
I tried this following post, but I am not successful. Please can anyone help me?
what can I do to make display the bin folder on eclipse?
The reason why I am looking for bin folder is, I want to place some .dll files in it. Is there another way of incorporating .dll files? Any help is appreciated

You should not put any data in the bin directory. It gets deleted if you do a Project -> Clean. Instead you should put your libraries in a lib folder. I don't know how you are actually using your dll, but you can surely point to another directory.

If you are trying to include this dll only for development purposes, you can use LD_LIBRARY_PATH and include the path for your dlls. I did this in the past with eclipse. There are a location in the CDT eclipse project where you can include this.
If you are speaking about a java aplication that needs a dll, you can add the library in the project also like this http://www.dreamincode.net/forums/topic/96304-how-to-add-dll-files-in-javalibrarypath/, but I haven't done it never.

Related

Is it possible to make a Java project to executable file?

I have done a project in JavaFX. I used NetBeans IDE to do my project. I used MySQL as database. Currently I run my project with the help of NetBeans. Is there any way to make the project an executable file ?
What I meant by executable is to launch the project by double clicking on it. Suggest me some good and easy methods, with tutorial if possible.
What you are thinking of is a self-contained javafx application. Nifty guide here.
This is an .exe file (on windows, i tried it on kubuntu and it builds a nice .deb and a separate executable). You can place this executable somewhere else and it will work, even if no java is installed.
Netbeans has a folder for their projects. (Default: documents/NetbeansProjects)
There you will find your project.
First, click on the Clean and Build button inside netbeans.
Then you can find a .jar file in your project folder's dist folder.
You can use Launch4j to create executable file.
http://launch4j.sourceforge.net/

eclipse build path not including top folders

I have my eclipse project setup as follows. As you can see I have 'gamedata', 'images', and 'sounds' folders set in my buildpath as libraries.
Here is the folder structure of my project.
I have been work on this client server game for quite some time now in eclipse and all is well. I wanted to try to 'export' this as an 'executable jar' file. I did that and when I went to run it, I got an error loading an image. I then extracted the contents of that jar file to see why it was missing and realized that the 'gamedata', 'images', and 'sounds' folders are all not there, rather their subfolders/contents are at the top level.
This is the extracted folder below where you can see the missing top level folders.
Can anyone help me out here? Sorry if this is a stupid question but I have tried so many things in the build path and admittedly do not have much familiarity with it. I have tried to look online for proper project setups(I remember using a res folder in programming classes way back) and would appreciate any guidance on best practices as far as folder naming is concerned.
Thanks for any help here.
You need to declare images and gamedata under a "resources" folder, as in this question
Right-click your project, new, Resource Folder.
Add the path you want (images and gamedata).
Then select the option "Export Java source files and resources" when creating your jar executable.

Eclipse confusing package to be a folder

I have read some questions on this around here but my tries at the answer have not yielded success. Here is the problem:
Package:com.me.a
Folder(under above package):b
Java class(under above folder):Myclass.java
The proper package structure is com.me.a.b, but eclipse thinks 'b' is a folder. When I right click on b and go to build-source, there is an option that says "use as source folder" which then does something totally unwanted - creates a separate folder with the entire package path as a source folder, and uses a default package:
Folder: com.me.a.b
Package: default package
MyClass.java
How do I solve this annoying issue?
PS: I am unable to use images which to give a better idea but being new here, there is a restriction.
You have project/com/me/a/b set as the source folder. Your build path looks something like this.
You need to set project as the source folder. Your build path will look something like this afterward.
this is very strange. packages are basically folders, so saying that you have package com.me.a with a folder in it named b is essentially the same as having package com.me.a.b.
Or there is something wrong with the Eclipse's workspace metadata for this particular project?
Try creating new project with such package and class in it see if it is any different?
The behavior you describe when choosing "b" as a source folder is expected: you are basically telling eclipse that this folder b is a source folder, a root folder for source java files. this is the default package, every sub-folder of this one is considered a different java package...
I just had this same problem with ONE folder between about 100 folders. The solution turned out to be righ click on the folder (in the package view), choose "Build Path", and then "Include" (Instead of 'use as a source foldre' as the OP did). After that the folder turned into a package.

Why we just can't download a jar file of Javadocs of SWT from the main website

For almost every library I've come to see a link of the JAVADOCS jar to be downloaded, plain and simple. Why There is no jar for SWT ? and if there is why it's not on their website ..
Please note that I know there is a version in Eclipse help, and there is an online version, which I can't link to cause It doesn't validate cause it's in php ! no Index.html found
Though that's not what I'm looking for I tried it, I'm using SWT.jar and I want to attach the javadocs jar to it so when CTRL+Space and highlight a method I just see the docs right away beside etc you know..
Anyway Because I think SWT is so great I feel like there is a simple way to do that and I just can't see it maybe. if there is nothing I think I should file a feature request or somethin' to them.
Ok I kinda knew this question was not going to get much interest, so I gave it another try and I came back cause I don't want anyone to waste 1 hour of trying to figure out something like that..
Download the swt zip
Go to eclipse and load existing project
you'll find src.zip in that project
unzip src.zip and copy the folder "org" org\eclipse\swt..
paste that folder in src (inside the project)
select org folder in eclipse then go to project >> generate javadocs
If you're in windows you probably going to press on (Configure) to pick up the Javadoc.exe file it's in the C:\programFiles\java\jdk-xyz\bin\
choose where you want to drop the doc files, next then finish
ok, just go to the files and zip it, P.S zip the files don't zip the folder which contains the files cause when you load the docs as archive and validate it won't see the index.html
if you want to know how to load the archive, google it's in (in project properties>> java buildpath >> libraries tab >> swt jar >> add jar >> add your SWT.jar then expand and edit the javadoc location..
That was Robo detailed I know, I just don't want someone to read this and still can't do it
The suggested way to develop SWT apps is by following the instructions at Developing SWT applications using Eclipse. Each download page of eclipse includes an SWT section with SWT source complete zips.
The second way as mentioned is to look in your eclipse/plugins directory and use the 2 arch compatible jars provided there:
org.eclipse.swt.gtk.linux.x86_64_3.7.0.v3735b.jar
org.eclipse.swt.gtk.linux.x86_64.source_3.7.0.v3735b.jar
The source jar can be attached so as to provide javadoc. The javadoc (for most of the API shipped with eclipse) is stored in the eclipse/plugins/org.eclipse.platform.doc.isv_3.7.0.v20110602-0800.jar jar. If you unzip that, it should be in reference/api
I know that Eclipse is setting up a maven repository, although a quick scan for org.eclipse.swt only found 3.6.2 binaries and source. See http://maven.eclipse.org. They're still in they trail phase.

FDT / Eclipse : path variable

I am trying to create a script that would list all the linked libraries in an FDT project and their corresponding svn repositories.
My problem : I was not able to find the file on my system where Eclipse (or FDT, I'm not even sure) writes all of the path variables.
I have tried capturing changes on my system and have had no luck.
If anyone knows where to find this file (Mac OS X) or knows a technique I could use to find it, it would be very appreciated.
Thanks.
In FDT, you can find the list linked libraries in the .as3_classpath file if those libraries are in your project folder (or below). They reflect the content you add in the 'Library' tab of 'FDT Build Path' in your project's properties. There's also an entry in the .project file that reflect the linked libraries you add with the 'Source' tab. Those libraries can be located anywhere on your hard drive, and that's why you define 'path variables' for them.
Personally, I create a 'lib' folder in my project where I copy the libraries I need and add them with the 'Library' tab. I find it much easier to share the project (since everything is relative to the project) and you don't need to worry about having two projects modifying the same library file.
For the location of those 'Path' variables, as far as I know, could only be located in your eclipse installation folder or in your eclipse 'settings' folder, usually in your 'user' directory.