I have a problem now :
When I want to compile my project in Netbeans IDE I had this message error :
Problem: The project uses a class library called "toplink", but this class library was not found.
Solution: Click Resolve to open the Library Manager and create a new class library called "toplink".
In fact I didn't change anything and it works fine before?
What's the problem?
It seems that you have to import the library itself.
On the left pane in your Netbeans editor, you should have a series of panes. One of these is called the Projects pane. If you click on it, you should be able to see the files and packages which make up the project you are editing as nodes. One of these nodes, at the very end is called "Libraries". Right click on this node and select "Add Library". From there, you should be able to browse and locate the library.
I believe libraries are defined for the NetBeans installation rather than for the project. You can import a library into a project which would make it available on other NetBeans installations. Perhaps you are on a different computer or a new installation of NetBeans?
Related
I am trying to import a GUI project into my eclipse kepler on my Windows server 2012. After importing the package explorer looks like:
mygui.applet
mygui.swing.main
mygui.swing.main.dialogs
mygui.swing.main.events
Where as it should look like:
-mygui
-mygui.applet
-mygui.swing
Where my gui.swing is the parent package containing dialogs and events.
I tried importing the same project into another eclipse installed on a Windows 8 machine and it gets imported correctly.
Is this a problem of using eclipse on windows server 2012? Are there any pre-requisites I need to be aware of? Which other alternate Java builder can I use alternately on a virtual machine for a project of big size?
The method I am using to import my project is:
Create Java Project-> Import File System->Select Folder (This works on windows 8).
There is nothing wrong with your project. It's a preference in Eclipse. In the top right corner of the Package Explorer view is a downward-pointing triangle which opens up a drop down menu with an option called "Package Presentation" - this opens up a sub menu with the choices of "Flat" or "Hierarchical". You have "Flat" selected and need only to change to "Hierarchical" for the effect you desire.
I work with eclipse and I would like to use from external project library some class. Every time I open project properties add this external project I get following problem. There is no problems with another project libraries. This additional project has ticked "Is Library".
I think the best way to import an Android library is :
import your library projects to your workspace
right click your main project and properties
close to the top, choose Android
Then click add from the library section at the bottom
I would like to know something if possible. As I used JaspersoftStudio, I noticed that when creating new project folder it always came up with JRE library. I also see java editor in there as well. Is it possible to write and run java code in JaspersoftStudio GUI?
Please share your ideas on here.
Regard,
Sakura
As you may have noticed, Jaspersoft Studio is a repackaged eclipse. And yes it is possible to run Java code in it, it's just a bit more cumbersome than in vanilla eclipse.
In any of your jasper projects (the project icon in the explorer should have a little J), right click and open Properties.
In Java Build Path, add a new source folder.
In your new folder, create a new File, and put your main class in it.
You can now run it with the keyboard shortcut Alt-Shift-x j. I don't know if there's a menu for that too.
Additionally if you have an existing eclipse project, you can import it directly into Jaspersoft Studio using Import... Existing Projects into Workspace.
I have a Java Project in Eclipse, and a Java Dynamic Web Project in Eclipse. In the former, all the jar files are shown individually under the top-level project folder. In the latter, the jar files are under a Libraries folder and the navigation is more convenient.
Is it possible to organize them in the same way in the Java Project also? If so, how?
Update: It is the Project Explorer View. For the Java Project, I see: "my_project_name" with the arrow expanded to point downwards, then I see: "package_icon src/main/java" and below that "package_icon src/main/resources" and then 20 jar files one below the other: "jar_icon activation-1.1.jar", ...
For the Java Dynamic Web Project I see: "my_project_name" as above, then I see: "JAX-WS Web Services" (unexpanded), then "Deployment Descriptor" (unexpanded), then "Java Resources" which I have expandeded, so I see the components of it below, of which the first is: "package_icon src/main/java", then below it, "package_icon src/main/resources", then below it "libraries_icon Libraries" instead of 20 jars! I have the option of expanding Libraries if I really need to see the 20 jars.
The only option I found to make things prettier in Eclipse Kepler is to:
In the Project Explorer window there is a down arrow in the upper right corner. Select that and then Customize View.
Select 'Libraries from external' and then OK.
Kind of cheesy...
EDIT: Of course I had to go and do some more digging...and it looks like I'll have to try this and see how it works.
Similar to M Miller's answer (but for Juno), click Show 'Referenced Libraries' Node in the dropdown of the Package Explorer window:
I'm using:
Eclipse IDE for Java Developers
Version: Juno Release
Build id: 20120614-1722
I noticed this "feature" on Eclipse Juno (latest version), when you have a jar file added to the build path it is not shown as a single file on the project.
Try removing one of the jars from the build path to see if it shows up again.
I couldn't find how to turn it off though.
BTW... the project layout for your "Java Project" is more akin to a "Maven Project", which is a bit more powerful.
You should change into the Package Explorer by Window > show View. It will display all the referenced libraries in a Referenced Libraries folder.
Is it possible to import an existing Java project which is in my workspace, in an Android project which is also in my workspace? The Java project doesn't use stuff that is incompatible with Android. I could do it using a .JAR, but since I'm modifying the Java project a lot, I would like to import the whole source code and change it once in a while. Is it possible? Thanks
This is somewhat of a hack, but worked for my project:
Add both Android project and plain Java project to workspace
Go to properties for Android project -> Java Build Path -> Source
Click Link Source, in "Folder name", make sure to select the root directory of the plain Java project's src tree
Use a descriptive name for "Linked folder location", like "java_project_src".
Press Finish and compile
This setup will compile the plain-java code as Dalvik bytecode. In my case, I had pure java code with very limited dependencies, but wanted to share the pure java code with non-Android projects, instead of separately maintaining these files in every project.
I think you are talking about referencing other projects into the current project, if this is the case then you can do this by Right click on project, properties->Project Reference.
You can link another projects to your current project. Right click on your main project, choose Build Path -> Configure Build Path... In the dialog choose the Projects tab, then click Add.. button. Now choose the project you want to link and click OK. You'll now be able to use this project's sources inside your main project. Hope this helps.