# Running autopsy on netbeans not working

**URL:** <https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494>\
**Category:** Autopsy Development\
**Created:** [February 14, 2020, 3:24pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494 "2020-02-14T15:24:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Autopsy1](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Autopsy1](https://sleuthkit.discourse.group/u/Autopsy1)\
**Post date:** [February 14, 2020, 3:24pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/1 "2020-02-14T15:24:07Z")

</div>

I am getting this error  
platform.download:  
C:\Users\kriko\Documents\NetBeansProjects\autopsy\build.xml:27: Unsupported Java version: 13. Make sure that the Java version is 1.8.0\_66 or higher.

I did echo %java\_home%. I got C:\Program Files (x86)\Java\jre1.8.0\_241  
I did java -version I got  
java version “1.8.0\_241”  
Java™ SE Runtime Environment (build 1.8.0\_241-b07)  
Java HotSpot™ Client VM (build 25.241-b07, mixed mode, sharing)

I went to netbeans folder, /etc. And checked netbeans\_jdkhome I saw it is  
netbeans\_jdkhome=“C:\Program Files (x86)\Java\jdk-13.0.2\_windows-x64\_bin\jdk-13.0.2”

I am using windows 10, netbeans 11.2  
Any help?

I am now getting different error LIBEWF\_HOME must be set as an environment variable.  
BUILD FAILED (total time: 1 second)

---

<div class="post-metadata">

**Author:** ![Autopsy1](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Autopsy1](https://sleuthkit.discourse.group/u/Autopsy1)\
**Post date:** [February 14, 2020, 3:59pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/2 "2020-02-14T15:59:01Z")

</div>



---

<div class="post-metadata">

**Author:** ![apriestman](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/apriestman/32/24_2.png) [@apriestman](https://sleuthkit.discourse.group/u/apriestman)\
**Post date:** [February 14, 2020, 4:37pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/3 "2020-02-14T16:37:37Z")

</div>

Have you tried changing the netbeans\_jdkhome to point at 1.8.0\_241?

---

<div class="post-metadata">

**Author:** ![Autopsy1](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Autopsy1](https://sleuthkit.discourse.group/u/Autopsy1)\
**Post date:** [February 14, 2020, 5:10pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/4 "2020-02-14T17:10:24Z")

</div>

Yes, but now a different error .I updated my initial post.

---

<div class="post-metadata">

**Author:** ![apriestman](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/apriestman/32/24_2.png) [@apriestman](https://sleuthkit.discourse.group/u/apriestman)\
**Post date:** [February 14, 2020, 5:19pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/5 "2020-02-14T17:19:48Z")

</div>

You should have set that up while building TSK.

> <https://github.com/sleuthkit/sleuthkit/blob/develop/win32/BUILDING.txt>

---

<div class="post-metadata">

**Author:** ![Richard\_Cordovano](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/richard_cordovano/32/15_2.png) [@Richard\_Cordovano](https://sleuthkit.discourse.group/u/Richard_Cordovano)\
**Post date:** [February 14, 2020, 5:32pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/6 "2020-02-14T17:32:44Z")

</div>

Are you trying to build Autopsy from source or are you trying to develop a plugin using the Autopsy platform? If the latter, see [https://www.sleuthkit.org/autopsy/docs/api-docs/4.14.0/mod\_dev\_page.html](https://www.sleuthkit.org/autopsy/docs/api-docs/4.14.0/mod_dev_page.html). However, it looks like you are trying to build Autopsy from source…I don’t recommend doing this if you are just trying to create some additional capability through an extension point, i.e., to write an ingest module, report module, content viewer or data source processor (difficult). Download and use the platform instead.

Anyway, here is a draft of what I will eventually be adding to the Autopsy documentation:

1. Install Visual Studio Community 2015.

- [https://visualstudio.microsoft.com/vs/older-downloads](https://visualstudio.microsoft.com/vs/older-downloads)
- A Microsoft account and joining the Visual Studio Dev Essentials program will be required to enable the download.

1. Install Java Development Kit (JDK).

Install the 64 bit version using java-1.8.0-openjdk-1.8.0.222-1.b10.ojdkbuild.windows.x86\_64.msi. You should be able to get this at [https://openjdk.java.net/](https://openjdk.java.net/). Ensure that “OpenJFX Runtime” is installed as by default it is not.

![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/0d5d17940bee74424d0fe72cc19707cd917d4e3c.png)

After installation, confirm that your PATH environment variable has been updated to find the correct version of “java” and “javac”. The easiest way to do this is to open a command prompt and run ‘java -version’ and ‘javac -version.

![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/47035ba9a1de0e03490d195e76d18579950c5675.png)

If Windows cannot find java or if it finds a different version than installed reboot your machine and try the java/javac -version commands again.

1. Install NetBeans 8.2 IDE.

- [https://netbeans.org/downloads/](https://netbeans.org/downloads/)

1. Install Doxygen.

- [http://www.doxygen.nl/download.html](http://www.doxygen.nl/download.html)
- Download and run the Windows installer.

1. Install PostgreSQL 9.5.

- [https://www.postgresql.org/download/windows](https://www.postgresql.org/download/windows)
- Install 64-bit PostgreSQL 9.5 for Windows.

1. Clone Source Code Repositories

Clone the following repositories to your machine, or make forks and clone the forks for any code you want to work on and then submit PRs.

- Clone the repository at [https://github.com/madler/zlib](https://github.com/madler/zlib) into your parent directory.
- Clone the repository at [https://github.com/sleuthkit/libewf\_64bit](https://github.com/sleuthkit/libewf_64bit) into your parent directory.
- Clone the repository at [https://github.com/sleuthkit/libvhdi\_64bit](https://github.com/sleuthkit/libvhdi_64bit) into your parent directory.
- Clone the repository at [https://github.com/sleuthkit/libvmdk\_64bit](https://github.com/sleuthkit/libvmdk_64bit) into your parent directory.
- Clone the repository at [https://github.com/sleuthkit/sleuthkit](https://github.com/sleuthkit/sleuthkit) into your parent directory.
- Clone the repository at [https://github.com/sleuthkit/autopsy](https://github.com/sleuthkit/autopsy) into your parent directory.

1. Define Environment Variables  
Define the following environment variables:  
JAVA\_HOME: Path to your 64-bit JDK installation, e.g., C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-1.  
JRE\_HOME: Path to the JRE within your 64-bit JDK installation, e.g., C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-1\jre.  
JDK\_HOME : Path to your 64-bit JDK installation, e.g., C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-1.  
LIBEWF\_HOME: Path to your libewf clone, e.g., C:\Users\rcordovano\Work\libewf\_64bit.  
LIBVHDI\_HOME: Path to your libvhdi clone, e.g., C:\Users\rcordovano\Work\libvhdi\_64bit.  
LIBVMDK\_HOME: Path to the libvmdk subdirectory of your libvmdk clone, e.g., C:\Users\rcordovano\Work\libvmdk\_64bit\libvmdk.  
Note that unlike libvhdi you need to set this variable to the libvmdk subdirectory within the repository.  
POSTGRESQL\_HOME\_64: Path to your 64-bit PostgreSQL directory, e.g., C:\Program Files\PostgreSQL\9.5.  
TSK\_HOME: Path to your local sleuthkit clone, e.g., C:\Users\rcordovano\Work\sleuthkit.

2. Add the PostgreSQL bin to your PATH environment variable, e.g., C:\Program Files\PostgreSQL\9.5\bin

3. Add the ant directory in your NetBeans IDE installation to your path, e.g., C:\Program Files\NetBeans 8.2\extide\ant.

4. Build TSK

- The first time you build the SleuthKit, you will need to build several libraries the SleuthKit depends on. An easy way to do this is to change to the win32 directory of your sleuthkit clone and execute the following command, which will build both the dependencies and multiple Sleuthkit C++ targets (64-bit builds only):

python3 updateAndBuildAll.py -m

After this initial build, it is sufficient to simply build the Release\_PostgreSQL x64 sleuthkit target for the libtsk\_jni project using the in Visual Studio Community 2015 IDE. Open ~/sleuthkit/win32/tsk-win.sln in the IDE (File, Open, Project/Solution…), select the Release\_PostgreSQL and x64 target, select the libtsk\_jni project in the solution, and build.

 ![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/3f936f063d6ee6c9ff9a724a2c2eda2f22a69ac3.png)

- Open the sleuthkit Java bindings project (named “DataModel”) in the NetBeans IDE. The project is located in the bindings/java subdirectory of your sleuthkit clone.

- Set the Java platform as described below in the Autopsy build instructions.

- Build the dist-PostgreSQL target of the “DataModel” project in the NetBeans IDE by selecting the build.xml file and then Run Target from the context menu.

![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/b6fc0e99bc7dd4dd7b9e039264c48aab310a3590.png)

1. Build Autopsy

- Open the Autopsy project in the NetBeans IDE. The project is located in the top level directory of your autopsy clone.
- Select the Autopsy module suite project, select Properties from the context menu, and select Libraries under Categories in the Project Properties - Autopsy dialog:

 ![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/d224b763115d3f9cd35153b030cd92b917db2fab.png)

- Push the Manage Java Platforms button to bring up the Java Platform Manager dialog, and then push the Add Platform button to invoke the Add Java Platform wizard:

 ![](https://global.discourse-cdn.com/free1/uploads/sleuthkit/original/1X/708560b221b4bf67398ed5af760ee28886ede0f5.png)

- Follow the steps in the wizard to add the JDK installed in “Install Development Tools” step #3 as the Java platform for Autopsy.
- To build the entire Autopsy module suite, select the Autopsy module suite project and select Build in its context menu. You may also build individual NetBeans Modules (NBMs) within the suite by selecting the desired module project and selecting Build in it context menu.

---

<div class="post-metadata">

**Author:** ![Autopsy1](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Autopsy1](https://sleuthkit.discourse.group/u/Autopsy1)\
**Post date:** [February 16, 2020, 10:40pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/7 "2020-02-16T22:40:43Z")

</div>

[https://1drv.ms/t/s!AugIj68jhDbzaNZzs5FLnnReF40?e=3usYYa](https://1drv.ms/t/s!AugIj68jhDbzaNZzs5FLnnReF40?e=3usYYa)

Thats my logs file, and this error am getting on netbeans when running autopsy projec.

LIBEWF\_HOME is set too C:\Program Files\Autopsy-4.4.0\autopsy\modules\lib\x86\_64  
LIBVHDI\_HOME is set too C:\Program Files\Autopsy-4.4.0\autopsy\modules\lib\x86\_64  
same for LIBVMDK\_HOME

I downloaded autopsy msi installer, so dll files there in C:\Program Files\Autopsy-4.4.0\autopsy\modules\lib\x86\_64 …

Please check my logs. So I know how to fix.

---

<div class="post-metadata">

**Author:** ![lebronjames06](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@lebronjames06](https://sleuthkit.discourse.group/u/lebronjames06)\
**Post date:** [February 17, 2020, 12:22am UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/8 "2020-02-17T00:22:11Z")

</div>

Also when I select the Release\_PostgreSQL and x64 target, select the libtsk\_jni project in the solution, and build. i am getting error cannot open include file libewf.h no such file or directory.

---

<div class="post-metadata">

**Author:** ![lebronjames06](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@lebronjames06](https://sleuthkit.discourse.group/u/lebronjames06)\
**Post date:** [February 17, 2020, 4:01pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/9 "2020-02-17T16:01:23Z")

</div>

Cannot open include file libewf.h , cannot open input file libewf.lib.

I am getting that when am trying to open visual studio 2015, and try to build libtsk\_jni.I am getting that error.

What I have done

· Clone the repository at [https://github.com/madler/zlib](https://github.com/madler/zlib) into your parent directory.  
· Clone the repository at [https://github.com/sleuthkit/libewf\_64bit](https://github.com/sleuthkit/libewf_64bit) into your parent directory.  
· Clone the repository at [https://github.com/sleuthkit/libvhdi\_64bit](https://github.com/sleuthkit/libvhdi_64bit) into your parent directory.  
· Clone the repository at [https://github.com/sleuthkit/libvmdk\_64bit](https://github.com/sleuthkit/libvmdk_64bit) into your parent directory.  
· Clone the repository at [https://github.com/sleuthkit/sleuthkit](https://github.com/sleuthkit/sleuthkit) into your parent directory.  
I set up the enviroment variables.

JDK\_HOME to my jdk  
LIBEWF\_HOME to C:…\libewf\_64bit-master  
LIBVHDI\_HOME to C:…\libvhdi\_64bit-master  
LIBVMDK\_HOME to C:…\libvmdk\_64bit-master\libvmdk

I build libvhdi and libvmdk using visual studio successfully, i also build libewf successfully.  
All release - win 32.

Once I go to sleuthkit (last repo up there ) in visual studio, i am getting Link Fatal error cannot open input file libewf.lib when i try to build libtsk\_jni. Release\_postgresql X64.

the linkers are (LIBVMDK\_HOME}\msvscpp]\Release;(LIBVHDI\_HOME}\msvscpp]\Release ;$(LIBEWF\_HOME}\msvscpp]\Release

Note I copied zlib folder from libvmdk to libewf to make building libewf work.

---

<div class="post-metadata">

**Author:** ![lebronjames06](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@lebronjames06](https://sleuthkit.discourse.group/u/lebronjames06)\
**Post date:** [February 17, 2020, 5:58pm UTC](https://sleuthkit.discourse.group/t/running-autopsy-on-netbeans-not-working/494/10 "2020-02-17T17:58:18Z")

</div>

Its working now, I had to copyt libewf folder to sleuthkit folder…and build worked.

thanks
