Sharing source between two Netbeans projects
I have an existing Java project in Netbeans (a JSF web application). I'd like to experiment with GWT in a separate project - put pull in source from the original project. Is there any way to share source between two Netbeans projects.
When I attempt to add the source directory from the original project into the new the IDE complains that the source is already part of another project.
Asked by: Roman249 | Posted: 28-01-2022
Answer 1
If you're only experimenting then copy the necessary part of the existing project to a different directory. Of course changes won't be synchronized later.
If you'd like to keep both projects alive then create a separate project with the common code, and use it as a library.
Answered by: Max440 | Posted: 01-03-2022Answer 2
Use source control. With CVS, use modules. With Subversion, use svn:externals.
Answered by: Rafael634 | Posted: 01-03-2022Answer 3
Alternatively, try moving the source folder outside both project folders. Then add the source to each project. Do not have both projects open at the same time.
Answered by: Lenny414 | Posted: 01-03-2022Similar questions
java - Netbeans "default config" for Maven projects
I've got a Maven project under Netbeans that requires a non-default configuration because it is platform specific. If the user does not pick a configuration I have no way of knowing which platform to build for. I can't use profile activators because sometimes we build Windows binaries under a Linux box.
Is there a way to disable <default config> or fail a build with a descriptive error message if...
java - Replace Netbeans Projects Logical View to Outline View
Context: We are designing a Netbeans Platform RCP based Lua IDE. We have implemented a build system that allows users to easily enable/disable files and add aliases to rename files at buildtime. We feel it is necessary in a UI standpoint to have checkboxes next to our custom nodes in the projects logical tab in order to simplify enabling and disabling files
Problem: We want to replace the default BeanTreeView with ...
java - NetBeans won't show static web files under "Projects" view
I have a multi-module maven project in which one module is called "webapp" and has all the static files and directories for these static files in src/main/webapp.
I am used to seeing these files+directories under the "Projects" view, but now they no longer appear. (I switched to the latest version of NetBeans, which might be part of the reason.) What I see now is
webapp Maven Webapp (war)
-> Other Sou...
netbeans - could not run a java project from another where both the projects are in different systems
I have two projects each in different systems. And both the system are connected via a LAN cable.I have Try.java in my PC and Hello.java in another PC named HRIDYA-PC. I want to invoke MySum.java from Try.java. I want MySum.java to executed in the other system not in my system.
Here is my code for Try.java
package pkgtry;
import java.io.*;
public class Try
{
private static void runProcess(Stri...
java - NetBeans will not clean and build my projects
I am very new to Java. Whenever I try to perform a clean and build for my projects in NetBeans I keep getting the same errors over and over again with every project. unbalanced quotes in -Xbootclasspath/p:'C:\Users\Sharon's Computer\Desktop\ReaderIP2\${endorsed.classpath}' No matter what the project is I still get the same message; I have never been successful in performing a clean in build in the last two weeks that I h...
java - Netbeans won't display web project in Projects Tab
I'm running NetBeans 7.3 on Ubuntu 12.10. I'm taking a course in Java Web Development, so I have a project called jsage8 that contains my work for the course. Previously this project was displayed in the Projects tab just fine, but now opening the project doesn't do anything. It just says "No Project Open" when I click to open it in the Open Project menu. It will however open a normal Java Project folder that isn't a web b...
java - Netbeans fails to compile JSP in projects created on different OS
The next error occurs compiling a project in netbeans +7.2 when project has been created on different OS
compile-jsps:
[mkdir] Created dir: /var/lib/jenkins/jobs/workspace/build/generated/src
[java] Nov 05, 2013 4:47:29 PM org.apache.jasper.runtime.TldScanner scanJar
[java] WARNING: PWC6351: In TLD scanning, the supplied resource file:/var/lib/jenkins/jobs/workspace/lib/jsp-compilation-syscp/a...
java - Can't create new or open Netbeans projects in Ubuntu 14
When to try to create a project in Netbeans, it freezes up after clicking Finish. All my buttons are greyed out, and I have to close the dialogue. I would attach a picture to show, but Im missing a few rep points.
After I close this dialogue, I just see the blank netbeans screen with no projects visible in my projects sidebar.
If I try to Open Project and navigate to where I saved it, I can select the pro...
java - Stop Netbeans IDE form opening class tree in projects tree view
i want Netbeans 7.4 to stop automatically showing me classes (library .class files) in project tree (but not my .java files) when i go into the file.
For example:
When i open my App.java file, then Netbeans shows me it in projects tree view. //OK
When i open source file from external lib, then Netbeans shows me it in projects tree view.//NOT OK
Is there any place to configure that behavior??
java - Netbeans projects tree issue with custom Look and Feel
I am trying to create a custom dark look and feel module for Netbeans 8.0.2 and started with customising the project's tree.
I am extending SynthLookAndFeel and below is the synth.xml. It is very basic but the problem starts right here itself. I hope anyone can help me to resolve the issue so that I can start customising other controls as well.
<synth>
<style id="defaultStyle">
...
java - How well do Eclipse and Netbeans coexist?
I would like to have both Eclipse and Netbeans (with JUnit) installed on one system, so I can be somewhat familiar with both.
Besides GUI development (see "Using both Eclipse and Netbeans"), are there any other issues with using both IDEs on the same system, or even the same project?
java - How do you add files to a jar using Netbeans 6.5?
I am working on a Java project using Netbeans for the first time. I would like to use Netbeans 6.5 to create a jar including about 50 text files. Is there a simple way to do this?
Groovy, Netbeans and Java EE
I want to develop a web application (no frameworks) mixing java with groovy. I am using the IDE Netbeans with the plugin.
If I start a new Java SE project and add a groovy class, it works with no problems.. but when I create a new java EE project and add a groovy class it can't compile and shows me the following error:
/home/webcodei/NetBeansProjects/testeGroovyWeb/src/java/pacote/Hello.java:23: can...
netbeans - How to cache a WSDL with Java-WS
I've created an app that interacts with a SOAP service using java WS. I generate classes and manage the WSDL using the built in netbeans functions.
Every time I run the application, it has to download the WSDL and parse it again. The WSDL is frozen at each version so I don't think this is necessary. I've tried to reference it as a local file, but then my app complains it can't find the file when it's installed o...
java - Build JavaFX project without NetBeans
I'm trying to learn JavaFX and maybe create a few "learner" games. I always do my development in Eclipse, rather than NetBeans which the JavaFX team is clearly trying to push.
Can anybody point me in the direction of a how-to for building a JavaFX project in Eclipse, or at least building a JavaFX project without NetBeans? Everyth...
netbeans - Cross Platform Button Ordering in Java and Swing
I'm creating a cross platform application using Swing and Netbeans (Group Layout). Is there a trick I am missing to help develop dialogs with say OK, Cancel buttons in the correct order for different platforms - specifically Windows (OK-Cancel) and Mac (Cancel-OK), rather like the JOptionPane does? I can derive my own class from JDialog with two buttons on it, and swap text and actions around - I...
Java bean event in netbeans 6.1
I'm having a JPanel bean which inside has two JToggle buttons.I compile and add this bean to the netbeans palette and then i add it to a frame.Then i right click the bean and from events i choose a mouse event let's say 'release'.This event corresponds to the JPanel and NOT in the two buttons inside.Thus i cannot catch mouse events coming from the JToggle buttons.How can i catch these events?
I hope it's a clear question
T...
java - Where can I set the JRE/JDK which is used to run Netbeans besides the command line?
First of all, I know about the command line parameter, but I don't want to use it because I want to learn, not just get it done, so...
Where can I set the JRE/JDK which is used to run Netbeans?
A little background:
I installed JDK 1.6_10 (The system is Windows Vista Business 64)
I installed Netbeans 6.5
After a few weeks I uninstalled Netbeans 6.5 (some probl...
java - Netbeans and .NET web services
I'm not an experienced java developer so any comment will be welcomed ...
I've written a web service using c# and I wanted to consume this service from java - used Netbeans for this task.
All methods works well beside one: the method expecting a type called BusinessDataField2 - this type contains 2 fields: name(string) and value(object)
Those fields are filled using get,set methods - this works easi...
java - How to run a NetBeans project in command prompt?
My professor asked us to create a Java program that would be able to run in command prompt but could also be opened using NetBeans.
The program is about using the different types of sorting (specifically Selection, Insertion, Exchange, Quick, and Heap sorting). our professor specifically told us to use object oriented programming in Java, and that she wants to see a main class plus the different classes that would ...
Still can't find your answer? Check out these amazing Java communities for help...
Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)