Ancestris Support > ENGLISH

How to run Ancestris from NetBeans?

(1/3) > >>

AndreasG:
Hello,

please be aware that I am neither familiar with using NetBeans nor ant!

Trying to run Ancestris from NetBeans using button "Run Project (Ancestris-12) (F6)" results in error message:

--- Code: ---C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\build.xml:7: The following error occurred while executing this line:
C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\nbproject\build-impl.xml:41: Cannot find NetBeans build harness.
Check that nbplatform.custom.netbeans.dest.dir and nbplatform.custom.harness.dir are defined.
On a developer machine these are normally defined in C:\Users\Andreas\AppData\Roaming\NetBeans\19\build.properties=C:\Users\Andreas\AppData\Roaming\NetBeans\19/build.properties
but for automated builds you should pass these properties to Ant explicitly.

--- End code ---

Further details please see below.

Building/running "ancestris.app" results in:

--- Code: ---C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\build.xml:7: The following error occurred while executing this line:
C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\nbproject\build-impl.xml:44: Cannot find C:\Users\Andreas\Documents\netbeans_platform_12.5\harness\build.xml imported from C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\nbproject\build-impl.xml

--- End code ---
Building/running "core" throws same messages with "core" instead of "ancestris.app".
Folder C:\Users\Andreas\Documents\netbeans_platform_12.5 does not exist.

Hoping somebody can tell me what I am doing wrong and/or what I have to do.

Thanks and regards
Andreas


Installation details from NetBeans <Help><About>

--- Code: ---Product Version: Apache NetBeans IDE 19
Java: 20.0.1; OpenJDK 64-Bit Server VM 20.0.1+9-29
Runtime: OpenJDK Runtime Environment 20.0.1+9-29
System: Windows 10 version 10.0 running on amd64; UTF-8; de_DE (nb)
User directory: C:\Users\Andreas\AppData\Roaming\NetBeans\19
Cache directory: C:\Users\Andreas\AppData\Local\NetBeans\Cache\19

--- End code ---

Installation dates (because of the versions)

--- Code: ---Java: July 2023
NetBeans: November 2023
Ancestris: November 2023 - via svn according to https://docs.ancestris.org/books/contribution/page/coding with user 'anonymous' and password 'password'

--- End code ---

Further details

--- Code: ---C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\build.xml:7:
<import file="nbproject/build-impl.xml"/>

C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\nbproject\build-impl.xml:41:
<ant antfile="nbproject/platform.xml"/>

C:\Users\Andreas\AppData\Roaming\NetBeans\19\build.properties:
nbplatform.default.harness.dir=${nbplatform.default.netbeans.dest.dir}/harness
nbplatform.default.netbeans.dest.dir=C:\\ProgAdd\\NetBeans-19\\netbeans

In <View><IDE log> I found:
WARNING [org.netbeans.modules.apisupport.project]: Project in C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\core is missing its platform 'custom', switching to default platform

--- End code ---

Zurga:
Like the message said : use Netbeans 12.5, not 19.
You can download it from : https://netbeans.apache.org/front/main/download/nb125/nb125/
The other way is to download the Ancestris zip package from site and use platform and harness directory as platform for Netbeans in order to launch Ancestris from Netbeans.

Please indicates if this help.

Could you indicate what you intend to do with the code ?

Zurga

AndreasG:
Thank you for your quick reply.

Nearly 15 years ago I started to develop a stand-alone program to show genealogy data based on gedcom format. Now I want to try to integrate this in Ancestris as a report. I will first do it only for myself to prove whether I can get this working. So I currently do not need to make changes to the original code.


According to your proposal I have deleted the project directory and deinstalled NetBeans 19 and installed NetBeans 12.5 instead. And I had to install Java 11 (version 11.0.22+7) because NetBeans 12.5 does not run with a higher Java version (Java download from "https://www.openlogic.com/openjdk-downloads?field_java_parent_version_target_id=406&field_operating_system_target_id=All&field_architecture_target_id=All&field_java_package_target_id=All").


--- Code: ---Product Version: Apache NetBeans IDE 12.5
Java: 11.0.22; OpenJDK 64-Bit Server VM 11.0.22+7-adhoc..jdk11u
Runtime: OpenJDK Runtime Environment 11.0.22+7-adhoc..jdk11u
System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
User directory: C:\Users\Andreas\AppData\Roaming\NetBeans\12.5
Cache directory: C:\Users\Andreas\AppData\Local\NetBeans\Cache\12.5

--- End code ---


But the problems are the same ones:

--- Code: ---C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\build.xml:7: The following error occurred while executing this line:
C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\nbproject\build-impl.xml:41: Cannot find NetBeans build harness.
Check that nbplatform.custom.netbeans.dest.dir and nbplatform.custom.harness.dir are defined.
On a developer machine these are normally defined in C:\Users\Andreas\AppData\Roaming\NetBeans\12.5\build.properties=C:\Users\Andreas\AppData\Roaming\NetBeans\12.5/build.properties
but for automated builds you should pass these properties to Ant explicitly.

--- End code ---

--- Code: ---C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\build.xml:7: The following error occurred while executing this line:
C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\nbproject\build-impl.xml:44: Cannot find C:\Users\Andreas\Documents\netbeans_platform_12.5\harness\build.xml imported from C:\Users\Andreas\Documents\NetBeansProjects\AncestrisCore\ancestris.app\nbproject\build-impl.xml

--- End code ---


Ancestris.zip (downloaded July 2023) has directories platform and harness. But I do not know where to place them in the project directory.

Andreas

Zurga:
Place it outside of the project.
Then go to "Tools" menu => "Netbeans platform".
Add a new one named "custom" and point the directory where you put the platform directory.

Then you can check that the project will use the correct platform : right-click on project "Ancestris 12", open "Properties", then "Libraries" then check the "Netbeans Platform" value.

This should allow you to launch the application from Netbeans.

Zurga

AndreasG:
Everything is as you described it.

I copied directories platform and harness to a newly created directory and changed <Tools><NetBeans Platforms>.
Ancestris-12 <Properties><Libraries><Netbeans Platform> shows the expected.

But however I am using the name "custom" or the original label
"Apache NetBeans Platform Dev (Build 12.5-fd523ddc12d6156412d7b81f0c8663d8913d1021)"

=> the error message remain unchanged in both cases.

Must be done any changes in one or more of the config files?

Andreas

Navigation

[0] Message Index

[#] Next page

Go to full version