hellojava 0.0.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/Rakefile +9 -0
- data/ext/hellojava/Calc.java +11 -0
- data/ext/hellojava/Hoge.java +9 -0
- data/ext/hellojava/JavaCallTest.java +9 -0
- data/hellojava.gemspec +19 -0
- data/lib/hellojava.rb +26 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ee74609312914eb653568ea4b13a5f5c83f62584f2b0da524fee0c8bdbe57986
|
4
|
+
data.tar.gz: fd2e78b76f0290a4685a2aef05fb3ccb555dbcf5889b529de23516fb8085cc5a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f2f6e0bfa1f59bf8181d70ab49e5bc755b5c0470eab2f4722f9db56154fde91b40a82ec0ac266563658cfc6cafb5bbd4ee44f72987254d113f6a89529cef9f1
|
7
|
+
data.tar.gz: 6d6a684c4e14e257402cc7fa3728b532d6bf2c579c001ea90b7fc929837f99792e4ffca528f434d33e75ea7c937ea8ac995bbda973365ee10bfc3b0224480773
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 siranovel
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/Rakefile
ADDED
data/hellojava.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'hellojava'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = '2023-09-02'
|
5
|
+
s.summary = "hello jruby"
|
6
|
+
s.description = "call from jruby to java."
|
7
|
+
s.platform = 'java'
|
8
|
+
s.authors = ["siranovel"]
|
9
|
+
s.email = "siranovel@gmail.com"
|
10
|
+
s.homepage = "http://github.com/siranovel/stdy4act"
|
11
|
+
s.license = "MIT"
|
12
|
+
s.files = ["LICENSE", "Gemfile", "CHANGELOG.md"]
|
13
|
+
s.files += ["hellojava.gemspec"]
|
14
|
+
s.files += Dir.glob("{lib,ext}/**/*")
|
15
|
+
s.extensions = %w[Rakefile]
|
16
|
+
s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
17
|
+
s.add_development_dependency 'rake-compiler', '~> 1.2', '>= 1.2.5'
|
18
|
+
end
|
19
|
+
|
data/lib/hellojava.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'java'
|
2
|
+
require 'hellojava.jar'
|
3
|
+
java_import 'java.lang.System'
|
4
|
+
java_import 'JavaCallTest'
|
5
|
+
java_import 'Hoge'
|
6
|
+
|
7
|
+
module HelloJavaLib
|
8
|
+
|
9
|
+
def func_a()
|
10
|
+
System.out.println("Hello, JRuby")
|
11
|
+
end
|
12
|
+
def func_b()
|
13
|
+
p JavaCallTest.str1
|
14
|
+
end
|
15
|
+
def func_c(value1, value2)
|
16
|
+
hoge = Hoge.new
|
17
|
+
calc = hoge.getCalc(value1, value2)
|
18
|
+
p calc.add
|
19
|
+
end
|
20
|
+
|
21
|
+
module_function :func_a
|
22
|
+
module_function :func_b
|
23
|
+
module_function :func_c
|
24
|
+
|
25
|
+
end
|
26
|
+
|
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hellojava
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- siranovel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-09-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '12.3'
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 12.3.3
|
22
|
+
name: rake
|
23
|
+
prerelease: false
|
24
|
+
type: :development
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '12.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 12.3.3
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - "~>"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '1.2'
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.2.5
|
42
|
+
name: rake-compiler
|
43
|
+
prerelease: false
|
44
|
+
type: :development
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.2'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.2.5
|
53
|
+
description: call from jruby to java.
|
54
|
+
email: siranovel@gmail.com
|
55
|
+
executables: []
|
56
|
+
extensions:
|
57
|
+
- Rakefile
|
58
|
+
extra_rdoc_files: []
|
59
|
+
files:
|
60
|
+
- CHANGELOG.md
|
61
|
+
- Gemfile
|
62
|
+
- LICENSE
|
63
|
+
- Rakefile
|
64
|
+
- ext/hellojava/Calc.java
|
65
|
+
- ext/hellojava/Hoge.java
|
66
|
+
- ext/hellojava/JavaCallTest.java
|
67
|
+
- hellojava.gemspec
|
68
|
+
- lib/hellojava.rb
|
69
|
+
homepage: http://github.com/siranovel/stdy4act
|
70
|
+
licenses:
|
71
|
+
- MIT
|
72
|
+
metadata: {}
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options: []
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
requirements: []
|
88
|
+
rubygems_version: 3.3.26
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: hello jruby
|
92
|
+
test_files: []
|