我最近一直在使用 jpype 与一些使用 python 的 java 代码集成,并且没有遇到任何真正的问题。我现在尝试在新系统上设置我的堆栈,但遇到了困难。
我正在运行 32 位 Python 3.6.5 和 32 位 Oracle Java 1.8 update 171。Python 和 jpype 已使用 conda ( conda create -n venv -c conda-forge python jpype1 arrow) 安装,并且
jpype.getDefaultJVMPath()返回预期路径 ( C:\Program Files (x86)\Java\jre1.8.0_171\bin\client\jvm.dll),但是会引发异常,指出找不到模块。下面是 python 控制台的输出。
Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 16:13:16) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
>>> import os
>>> …Run Code Online (Sandbox Code Playgroud) 我目前正在尝试在角材料 2 中创建传单贴图 tab-group,如下所示
import {Component, NgModule} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser'
import { MaterialModule } from '@angular/material';
import { Component, OnInit, OnDestroy } from '@angular/core';
import 'leaflet';
@Component({
selector: 'minimap',
template: `<div #minimap [id]="id" class=leaflet-map></div>`
})
export class MiniMap implements OnInit, OnDestroy {
map: L.Map = null;
id: string;
constructor() {
this.id = "map" + Date.now();
}
ngOnInit() {
this.map = L.map(this.id).setView([54.5, -115.0], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution:
'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(this.map);
}
ngOnDestroy() { …Run Code Online (Sandbox Code Playgroud)