gpt4 book ai didi

java - 在运行 Strawberry Perl 的 Windows 上安装 Inline::Java 的问题

转载 作者:太空宇宙 更新时间:2023-11-04 11:19:46 25 4
gpt4 key购买 nike

我正在尝试在运行 ActivePerl 的 Windows 10 计算机上安装 Inline::Java。由于 cpan -i Inline::Java 不起作用,我下载了该模块,并尝试进行安装:

perl MakeFile.PL
gmake
gmake test
gmake install

Welcome to the Inline::Java installation procedure.

Using C:\Program Files\Java\jdk1.8.0_131 as J2SDK directory.

Default J2SDK for Inline::Java will be 'C:\Program Files\Java\jdk1.8.0_131'.
See module documentation for information on how to use a different J2SDK
or change this default value.

Inline::Java can use a JNI extension that allows the Java Virtual Machine
(JVM) to be dynamically linked with Perl instead of running as a separate
process. The use of this extension is optional, and building it still
allows Inline::Java to run the JVM in the default (separate process)
fashion.
Note: You need a C compiler to build the extension.
Do you wish to build the JNI extension? [y] y

Building JNI extension.

Building with:
C:\Program Files\Java\jdk1.8.0_131\include\jni.h
C:\Program Files\Java\jdk1.8.0_131\include\win32\jni_md.h
C:\Program Files\Java\jdk1.8.0_131\lib\jvm.lib
C:\Program Files\Java\jdk1.8.0_131\jre\bin\server\jvm.dll

Note: In order for Inline::Java to use the JNI extension, you will need to
use the JNI configuration option or set the PERL_INLINE_JAVA_JNI environment
variable to a true value. You will also need to add the following directories
to your PATH environment variable:
C:\Program Files\Java\jdk1.8.0_131\jre\bin\server
See README.JNI for more information.

The PerlInterpreter extension allows Inline::Java to be loaded directly from
Java using an embedded Perl interpreter. It is still EXPERIMENTAL and
may not build or work properly on all platforms. See documentation for
more details.
Do you wish to build the PerlInterpreter extension? [n] n

Writing MYMETA.yml and MYMETA.json
Generating a gmake-style Makefile
Writing Makefile for Inline::Java
Writing MYMETA.yml and MYMETA.json

You can continue the installation with the following commands:
% nmake
% nmake test
% nmake install

C:\Users\msrivastava\Downloads\Inline-Java-0.53>gmake
"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" -deprecation -g -d Java\classes Java\sources\org\perl\inline\java\*.java
javac: file not found: Java\sources\org\perl\inline\java*.java
Usage: javac <options> <source files>
use -help for a list of possible options
gmake: *** [Makefile:981: java.ts] Error 2

C:\Users\msrivastava\Downloads\Inline-Java-0.53>gmake test
"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" -deprecation -g -d Java\classes Java\sources\org\perl\inline\java\*.java
javac: file not found: Java\sources\org\perl\inline\java*.java
Usage: javac <options> <source files>
use -help for a list of possible options
gmake: *** [Makefile:981: java.ts] Error 2

C:\Users\msrivastava\Downloads\Inline-Java-0.53>gmake install
"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" -deprecation -g -d Java\classes Java\sources\org\perl\inline\java\*.java
javac: file not found: Java\sources\org\perl\inline\java*.java
Usage: javac <options> <source files>
use -help for a list of possible options
gmake: *** [Makefile:981: java.ts] Error 2

有人遇到过类似的问题或使用 Strawberry Perl 在 Windows 上成功安装了 Inline::Java 吗?

最佳答案

此过程适用于 Windows 7 上的安装:

  1. 已安装 JDK Java 开发工具包版本 7
  2. JAVA_HOME 变量位于 PATH 中
  3. 安装 Inline、Inline::C
  4. 从 tar 文件而不是 cpan 安装 Inline::Java 0.58
  5. 来自未解压的文件夹:perl Makefile.PL J2SDK="c:\path\to\java_home"(JNI 选项 no)
  6. dmake、dmake 测试、dmake 安装

其他程序也可能有效。

关于java - 在运行 Strawberry Perl 的 Windows 上安装 Inline::Java 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45057296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com