Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Java】ラッパー作成 #18

Closed
samunohito opened this issue Mar 23, 2019 · 2 comments
Closed

【Java】ラッパー作成 #18

samunohito opened this issue Mar 23, 2019 · 2 comments

Comments

@samunohito
Copy link
Owner

extern_cのプロジェクトをビルドして出てきたものをJNIを通じてJavaから操作できるようにする。

@samunohito
Copy link
Owner Author

C#と似たような感じになるだろうけど、大体以下を想定している。上の方がベターだと思ってるやり方。

  1. jarにdll/soを持たせて、ClassLoader経由で直接読み込む
  2. jarにdll/soを持たせて、無ければ所定の場所に吐き出して読み込む
  3. jarにdll/soを一切持たせず、ユーザに配置してもらう
    (ない場合は例外でDL先を明示できれば尚良し)

@samunohito samunohito changed the title Javaのラッパー作成 【Java】ラッパー作成 Mar 24, 2019
samunohito added a commit that referenced this issue Apr 5, 2019
ネイティブ側とJVM側のソース作成
…と、JNI用のクロスコンパイル機構を作ったりjCenterにアップロードするスクリプトが膨らみまくったので、
思い切ってbuild.gradleを分割。見通しが良くなった。
samunohito added a commit that referenced this issue Apr 5, 2019
@samunohito
Copy link
Owner Author

ひとまず2を採用。1はJVMの仕様レベルで無理らしい。ファイルとして存在するライブラリしか読み取れないのだと。
MacOS/iOSには対応できなかった。ビルド環境の作り方がわからん。macじゃないと無理?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant