Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2825 times and has 2 replies Next Thread
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 484
Status: Offline
Reply to this Post  Reply with Quote 
How to generate a .h file with javah?

In the YafarayRenderer.java file of the new plugin , there is the procedure to generate the YafarayRenderer.h file.

By replacing the initial packages with that of the PhotoVideoRendering plugin, I get this error message:
Error: Could not find class file for 'betaTest_plugin.YafarayRenderer'.


Enko
----------------------------------------
EnkoNyito gallery
[Nov 10, 2019, 4:18:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7222
Status: Offline
Reply to this Post  Reply with Quote 
Re: How to generate a .h file with javah?

To generate a .h file, you have to compile first the class which contains native methods, and add the path of the compiled class to the classpath used by javah.
Have a look to the comment of loadDLLs method in YafarayRenderer class to get more ideas.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Nov 15, 2019, 5:38:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 484
Status: Offline
Reply to this Post  Reply with Quote 
Re: How to generate a .h file with javah?

Thank you Emmanuel!

Based also on this documentation, I was able to generate the YafarayRenderer.h file in the plugin package.
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class betaTestPlugin_YafarayRenderer */

#ifndef _Included_betaTestPlugin_YafarayRenderer
#define _Included_betaTestPlugin_YafarayRenderer
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: betaTestPlugin_YafarayRenderer
* Method: createEnvironment
* Signature: (Ljava/lang/String;Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_betaTestPlugin_YafarayRenderer_createEnvironment
(JNIEnv *, jobject, jstring, jstring);


Since I don't know JNI, generating DLLs is less obvious and I get an error in Eclipse when rendering.

It's easier with the modified YafaRay rendering plugin because I kept your packages and added the necessary files and folders.
----------------------------------------
EnkoNyito gallery
[Nov 16, 2019, 1:51:06 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2020 eTeks - All rights reserved