SlideShare a Scribd company logo
1 of 49
Download to read offline
JJUG CCC

@tikemin

13年11月9日土曜日
Attention

13年11月9日土曜日
Biographi

• @tikemin
• えすあいあー
• JJUGとは今年の4月から
• 本格的にJava始めたのもそのぐらい
• Bio:Web/Embedded/Robo
もの作りが趣味
13年11月9日土曜日
RoboVM

13年11月9日土曜日
What is RoboVM

• Compiler translates Java bytecode into native
ARM or x86 code

• RoboVM 0.0.6
• Niklas Therning(@robovm)
• Apache License v2.0
• Alpha software
Java Translator
13年11月9日土曜日
iOS app development according to java
J2ObjC

• An open-source command-line tool from Google
• Translator tool Java code to Objective-C for the iOS platform
• Does not provide any sort of platform-independent UI toolkit
Apps that use J2ObjC

13年11月9日土曜日
What is RoboVM

• Warning! RoboVM is alpha software. It's not yet
ready for production use. Expect to be bitten by
bugs. If you find a bug, please report it.

• It is not enough to use for iOS applications...
But last update is 1 week ago
13年11月9日土曜日
Hello RoboVM

13年11月9日土曜日
Hallo RoboVM
How to Install(Eclipse)

• install new Software

13年11月9日土曜日

http://download.robovm.org/eclipse/
Hallo RoboVM

• How to Install
• command line tool
http://download.robovm.org/robovm-0.0.6.tar.gz

only donwload and unpack it
13年11月9日土曜日
Hello RoboVM
1 public class HelloWorld {
2
public static void main(String[] args) {
3
System.out.println("Hello world!");
4
}
5 }
mkdir classes
javac -d classes/ HelloWorld.java
robovm-0.0.6/bin/robovm -verbose -cp classes/ HelloWorld

Let s try Build
13年11月9日土曜日
You ll wait too long time
A simple class like HelloWorld References
about 1500 classes directly or indirectly.
RoboVM keeps a cache of compiled classes and
only recompiles a class when it or any of its
direct dependencies have changed.
HelloWorld/lib/boot/robovm-rt.jar
HelloWorld/lib/classes0.jar
HelloWorld/HelloWorld
Let's take a quick peek at the contents of the HelloWorld folder

13年11月9日土曜日
iOS Demo
6 public class IOSDemo extends UIApplicationDelegate.Adapter {
7
8
private UIWindow window = null;
9
private int clickCount = 0;
10
11
@Override
12
public boolean didFinishLaunching(UIApplication application,
13
NSDictionary launchOptions) {
14
15
final UIButton button = UIButton.fromType(UIButtonType.RoundedRect);
16
button.setFrame(new CGRect(115.0f, 121.0f, 91.0f, 37.0f));
17
button.setTitle("Click me!", UIControlState.Normal);
18
19
button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() {
20
@Override
21
public void onTouchUpInside(UIControl control, UIEvent event) {
22
button.setTitle("Click #" + (++clickCount), UIControlState.Normal);
23
}
24
});
25
26
window = new UIWindow(UIScreen.getMainScreen().getBounds());
27
window.setBackgroundColor(UIColor.lightGrayColor());
28
window.addSubview(button);
29
30
window.makeKeyAndVisible();
31
32
return true;
33
}
...
13年11月9日土曜日
Simple Sample Program

Demo

13年11月9日土曜日
iphone application like very...
6 public class IOSDemo extends UIApplicationDelegate.Adapter {
7

11
12
13
14

@Override
public boolean didFinishLaunching(UIApplication application,
NSDictionary launchOptions) {

UIButton create.
15
16
17
18
19
20
21
22
23
24

13年11月9日土曜日

final UIButton button = UIButton.fromType(UIButtonType.RoundedRect);
button.setFrame(new CGRect(115.0f, 121.0f, 91.0f, 37.0f));
button.setTitle("Click me!", UIControlState.Normal);
button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() {
@Override
public void onTouchUpInside(UIControl control, UIEvent event) {
button.setTitle("Click #" + (++clickCount), UIControlState.Normal);
}
});
Objective-c block
1
2
3
4
5
6
7
8
9
10
11
12

public static void main(String[] args) {
Dispatch.Queue queue = Dispatch.getGlobalQueue(
Dispatch.QUEUE_PRIORITY_DEFAULT, 0);
for (int i = 1; i <= 5; i++) {
final String msg = String.format("Block #%d", i);
Dispatch.async(queue, new VoidBlock() {
public void invoke() {
System.out.println(msg);
}
});
}
}

u able to run tasks asynchronously like this

13年11月9日土曜日
RoboVM
java.util.* and java.lang.* can use.
1
2
3
4
5
6

final java.util.Date date = new java.util.Date();
//can't use SimpleDateFormat...
String title = "JJUG 2013" + date.toString();
final UIButton button = UIButton.fromType(UIButtonType.RoundedRect);
button.setFrame(new CGRect(30.0f, 121.0f, 250.0f, 37.0f));
button.setTitle(title, UIControlState.Normal);

1
2
3
4
5
6
7
8
9
10
11

final java.util.List<String> arrlist =
arrlist.add("spring");
arrlist.add("fall");

13年11月9日土曜日

new java.util.ArrayList<String> ();

button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() {
@Override
public void onTouchUpInside(UIControl control, UIEvent event) {
button.setTitle("Click #" + (++clickCount) + " "
+ arrlist.get(1), UIControlState.Normal);
}
});
JavaFX

13年11月9日土曜日
Simple Java FX Program

Demo

13年11月9日土曜日
JavaFX8
Java
1

MigPane root = new MigPane("gap 10, flowy",
"[fill,grow,center]", "[]");

...
4
5
6
7
8

13年11月9日土曜日

Scene scene = new Scene(root, 320, 480);
scene.getStylesheets().add("/com/ultramixer/
javafx4ios/javafx4ios.css");
primaryStage.setTitle("JavaFX8 on iOS");
primaryStage.setScene(scene);
primaryStage.show();
RoboVM+JavaFX(CSS)
Java
26
27

Label headline = new Label("JavaFX8 on iOS JJUG
2013 CCC Fall");
headline.setId("headline");

CSS
1 #headline {
2
-fx-font-size: 15;
3 }

u can make a design with CSS
13年11月9日土曜日
RoboVM+JavaFX(CSS)
Java
40
41
42
43
44
45
46
47
48
49

Button b2 = new Button("JJUG!!");
b2.setId("btn");
b.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent actionEvent)
{
primaryStage.close();
}
});

CSS
1 #btn {
2
-fx-background-radius: 10px;
3
-fx-background-color: linear-gradient(to bottom,
4
#BBBBCC 0%, #AAAAAA 100%);
5 }
13年11月9日土曜日
Birck Breaker

Demo

13年11月9日土曜日
Birck Breaker
Splash UI is programmed by ImageView(Java)
1 package brickbreaker;
2
3 import javafx.animation.KeyFrame;
4 import javafx.animation.Timeline;
5 import javafx.event.ActionEvent;
6 import javafx.event.EventHandler;
7 import javafx.scene.Group;
8 import javafx.scene.Node;
9 import javafx.scene.Parent;
10 import javafx.scene.image.ImageView;
11 import javafx.scene.input.KeyEvent;
12 import javafx.scene.input.MouseEvent;
13
14 public class Splash extends Parent {
15
16
private static final int STATE_SHOW_TITLE = 0;
17
private static final int STATE_SHOW_STRIKE = 1;
18
private static final int STATE_SUN = 2;
19
20
private static final int SUN_AMPLITUDE_X = Config.SCREEN_WIDTH * 2 / 3;
21
private static final int SUN_AMPLITUDE_Y = Config.SCREEN_WIDTH / 2;
22
23
private ImageView background;
24
private ImageView brick;
25
private ImageView brickShadow;
26
private ImageView breaker;
...

need the effort..x(

13年11月9日土曜日
FXML

13年11月9日土曜日
Setting forceLinkClasses

• robovm.xml
1 <forceLinkClasses>
2
<pattern>javafx.scene.web.WebView</pattern>
3 </forceLinkClasses>

currently experimental...
13年11月9日土曜日
OpenGL ES

13年11月9日土曜日
Using OpenGL Program

Demo

13年11月9日土曜日
Using OpenGL Program

sorry. i can not show you..

Demo

13年11月9日土曜日
RoboVM + OpenGLES
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

private void update(GLKViewController controller) {
if (increasing) {
curRed += 1.0f * controller.getTimeSinceLastUpdate();
} else {
curRed -= 1.0f * controller.getTimeSinceLastUpdate();
}
if (curRed >= 1.0f) {
curRed = 1.0f;
increasing = false;
}
if (curRed <= 0.0f) {
curRed = 0.0f;
increasing = true;
}
}
@Override
public void draw(GLKView view, CGRect rect) {
GL.glClearColor(curRed, 0.0f, 0.0f, 1.0f);
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
}

13年11月9日土曜日
RoboVM + OpenGLES
1 import org.robovm.rt.bro.*;
2 import org.robovm.rt.bro.annotation.*;
3
4 @Library("OpenGLES")
5 public class GL {
6
static {
7
Bro.bind(GL.class);
8
}
9
10
public static final int GL_DEPTH_BUFFER_BIT = 0x00000100;
11
public static final int GL_STENCIL_BUFFER_BIT = 0x00000400;
12
public static final int GL_COLOR_BUFFER_BIT = 0x00004000;
13
14
@Bridge
15
public static native void glClearColor(float red,
16
float green, float blue, float alpha);
17
18
@Bridge
19
public static native void glClear(int mask);
20 }

I never thought a screen fading from black to red would look this great!
It almost made me cry. :-)
13年11月9日土曜日
A serious Happning

13年11月9日土曜日
iOS7 + Mavericks

13年11月9日土曜日
Warning

• iOS6 provisioning is expired...
• Need to Xcode5.x(but Xcode4.x)
• I can t demo...

\(^o^)/OWATA
13年11月9日土曜日
RoboVM Update v0.0.6

• The reason why it failed is that gdb has been
removed from Xcode5 and the tool RoboVM used
to launch on device (fruitstrap) relied on gdb

13年11月9日土曜日
new RoboVM

• libimobiledevice
• libimobiledevice is a cross-platform software library that
talks the protocols to support iPhone, iPod Touch, iPad and
Apple TV®devices.

switched to using libgpod
13年11月9日土曜日
How to use in iOS7

• Get Java SE JDK 7 from Oracle
• Get Xcode 5.0.1 from the Mac App Store
• https://github.com/robovm/robovm/wiki/Hackingon-RoboVM

I plan to try bonus comes out
13年11月9日土曜日
Development Environment

13年11月9日土曜日
Maven
git
git clone https://github.com/robovm/robovm-sample-ios-app.git
cd robovm-sample-ios-app
mvn robovm:iphone-sim

To run on a device do
mvn robovm:ios-device
Your device has to be provisioned properly for this to work

u can use Intellij IDEA
13年11月9日土曜日
but i recommend eclipse

• Why?
• Easy to install (only add packege..)
• Offical update early

so, i recommend eclipse
13年11月9日土曜日
Why so English?

13年11月9日土曜日
実は...

• こんなやりとりが...
@tikemin @skrb It would be great to have these
#JavaFX RoboVM slides translated to English http://
t.co/Izvtzywzjl」

ということで英語の資料に
13年11月9日土曜日
実は...

• こんなやりとりが...
@tikemin @skrb It would be great to have these
#JavaFX RoboVM slides translated to English http://
t.co/Izvtzywzjl」

(Bio: Java/JavaFX/IoT developer, author and speaker)

ということで英語の資料に
13年11月9日土曜日
Summary

13年11月9日土曜日
Summary

• RoboVM
• Compiler translates Java bytecode into native
ARM or x86 code

• RoboVM+JavaFX
• RoboVM+OpenGLES
• iOS7(Java7)
Future is very fun!
13年11月9日土曜日
+α

13年11月9日土曜日
libGDX

• Desktop/Android/iOS/HTML5 Java game
development framework

•
•
•
•
•
•
•

Windows
Linux
Max OS X
Android (+1.5)
iOS
Java Applet (requires JVM to be installed)
Javascript/WebGL (Chrome, Safari, Opera, Firefox, IE via Google Chrome
Frame)

406 games listed in this gallery
13年11月9日土曜日
git hub

• robovm-llvm(Only .md file)
• https://github.com/robovm/robovm-llvm
• ObjC2RoboVM
• It is a parser that creates RoboVM bindings
from CLang AST dumps

Future is very fun!
13年11月9日土曜日
halt

13年11月9日土曜日

More Related Content

Viewers also liked

Mi metafora visual competencias en marketing
Mi metafora visual competencias en marketingMi metafora visual competencias en marketing
Mi metafora visual competencias en marketingAllan Gonzalez Torres
 
Str8ts Weekly Extreme #45 - Solution
Str8ts Weekly Extreme #45 - SolutionStr8ts Weekly Extreme #45 - Solution
Str8ts Weekly Extreme #45 - SolutionSlowThinker
 
Richard Kivel - презентация 1 апреля в НИУ ВШЭ
Richard Kivel - презентация 1 апреля в НИУ ВШЭRichard Kivel - презентация 1 апреля в НИУ ВШЭ
Richard Kivel - презентация 1 апреля в НИУ ВШЭLeonid Danilov
 
Understanding Places 09
Understanding Places 09Understanding Places 09
Understanding Places 09keneustadt
 
T pryor a day in the life
T pryor  a day in the lifeT pryor  a day in the life
T pryor a day in the lifetpryorp3
 
Työväenliikkeen kirjaston esittelydiasarja
Työväenliikkeen kirjaston esittelydiasarjaTyöväenliikkeen kirjaston esittelydiasarja
Työväenliikkeen kirjaston esittelydiasarjaTuomas Kangas
 
January 2011 housing starts in vancouver, bc from cmhc
January 2011 housing starts in vancouver, bc from cmhcJanuary 2011 housing starts in vancouver, bc from cmhc
January 2011 housing starts in vancouver, bc from cmhcMatt Collinge
 
25 Jan 2013 Network Meeting
25 Jan 2013 Network Meeting 25 Jan 2013 Network Meeting
25 Jan 2013 Network Meeting Noel Waterman
 
Bedrijfspresentatie J&V
Bedrijfspresentatie J&VBedrijfspresentatie J&V
Bedrijfspresentatie J&Vferenzj
 
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter Noel Waterman
 
Asian Drama Project
Asian Drama ProjectAsian Drama Project
Asian Drama Projectnotamuggle93
 
October and November Devil's Corner 2012 Newsletter ver 3
October and November Devil's Corner 2012 Newsletter ver 3 October and November Devil's Corner 2012 Newsletter ver 3
October and November Devil's Corner 2012 Newsletter ver 3 Noel Waterman
 
D rivas scavenger hunt
D rivas scavenger huntD rivas scavenger hunt
D rivas scavenger huntdrivasp3
 

Viewers also liked (17)

Mi metafora visual competencias en marketing
Mi metafora visual competencias en marketingMi metafora visual competencias en marketing
Mi metafora visual competencias en marketing
 
Str8ts Weekly Extreme #45 - Solution
Str8ts Weekly Extreme #45 - SolutionStr8ts Weekly Extreme #45 - Solution
Str8ts Weekly Extreme #45 - Solution
 
Richard Kivel - презентация 1 апреля в НИУ ВШЭ
Richard Kivel - презентация 1 апреля в НИУ ВШЭRichard Kivel - презентация 1 апреля в НИУ ВШЭ
Richard Kivel - презентация 1 апреля в НИУ ВШЭ
 
Understanding Places 09
Understanding Places 09Understanding Places 09
Understanding Places 09
 
T pryor a day in the life
T pryor  a day in the lifeT pryor  a day in the life
T pryor a day in the life
 
Data center sper sys
Data center sper sysData center sper sys
Data center sper sys
 
Työväenliikkeen kirjaston esittelydiasarja
Työväenliikkeen kirjaston esittelydiasarjaTyöväenliikkeen kirjaston esittelydiasarja
Työväenliikkeen kirjaston esittelydiasarja
 
January 2011 housing starts in vancouver, bc from cmhc
January 2011 housing starts in vancouver, bc from cmhcJanuary 2011 housing starts in vancouver, bc from cmhc
January 2011 housing starts in vancouver, bc from cmhc
 
My photo anaylsis
My photo anaylsisMy photo anaylsis
My photo anaylsis
 
25 Jan 2013 Network Meeting
25 Jan 2013 Network Meeting 25 Jan 2013 Network Meeting
25 Jan 2013 Network Meeting
 
writing_research_paper_facilitator_guide(goerzen2011)
writing_research_paper_facilitator_guide(goerzen2011)writing_research_paper_facilitator_guide(goerzen2011)
writing_research_paper_facilitator_guide(goerzen2011)
 
Bedrijfspresentatie J&V
Bedrijfspresentatie J&VBedrijfspresentatie J&V
Bedrijfspresentatie J&V
 
time_management_slides(goerzen_2011)
time_management_slides(goerzen_2011)time_management_slides(goerzen_2011)
time_management_slides(goerzen_2011)
 
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter
Thunderbolt Blast- Dec 12 Monthly Armor School Newsletter
 
Asian Drama Project
Asian Drama ProjectAsian Drama Project
Asian Drama Project
 
October and November Devil's Corner 2012 Newsletter ver 3
October and November Devil's Corner 2012 Newsletter ver 3 October and November Devil's Corner 2012 Newsletter ver 3
October and November Devil's Corner 2012 Newsletter ver 3
 
D rivas scavenger hunt
D rivas scavenger huntD rivas scavenger hunt
D rivas scavenger hunt
 

Similar to RoboVM

iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 EastiOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 Eastirgaly
 
HTML5-pronama-study
HTML5-pronama-studyHTML5-pronama-study
HTML5-pronama-studyNaoya Inada
 
楽しいアプリ制作の会 #12 Windows Phone 開発
楽しいアプリ制作の会 #12 Windows Phone 開発楽しいアプリ制作の会 #12 Windows Phone 開発
楽しいアプリ制作の会 #12 Windows Phone 開発Tomonori Ohba
 
20110212 Silverlight から Bing Maps に触れる
20110212 Silverlight から Bing Maps に触れる20110212 Silverlight から Bing Maps に触れる
20110212 Silverlight から Bing Maps に触れるKenji Wada
 
冬だからAndroid再入門
冬だからAndroid再入門冬だからAndroid再入門
冬だからAndroid再入門Katsumi Honda
 
Android Studioの魅力
Android Studioの魅力Android Studioの魅力
Android Studioの魅力Keiji Ariyama
 
レゴ×Kinect実験指導書
レゴ×Kinect実験指導書レゴ×Kinect実験指導書
レゴ×Kinect実験指導書Satoshi Fujimoto
 
Andoird版OpenCVのJavaサンプルを動かす
Andoird版OpenCVのJavaサンプルを動かすAndoird版OpenCVのJavaサンプルを動かす
Andoird版OpenCVのJavaサンプルを動かすshobomaru
 
PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化Takashi Okamoto
 
Web socketドロンくん その後-
Web socketドロンくん その後-Web socketドロンくん その後-
Web socketドロンくん その後-Yuuichi Akagawa
 
OpenGLプログラミング
OpenGLプログラミングOpenGLプログラミング
OpenGLプログラミング幸雄 村上
 
メディア・アート II 第1回: ガイダンス openFrameworks入門
メディア・アート II 第1回: ガイダンス openFrameworks入門メディア・アート II 第1回: ガイダンス openFrameworks入門
メディア・アート II 第1回: ガイダンス openFrameworks入門Atsushi Tadokoro
 
Xamarin で ReactiveUI を使ってみた
Xamarin で ReactiveUI を使ってみたXamarin で ReactiveUI を使ってみた
Xamarin で ReactiveUI を使ってみたHironov OKUYAMA
 
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvMedia Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvAtsushi Tadokoro
 
Titanium Mobile
Titanium MobileTitanium Mobile
Titanium MobileNaoya Ito
 
Spring BootでHello Worldのその先へ
Spring BootでHello Worldのその先へSpring BootでHello Worldのその先へ
Spring BootでHello Worldのその先へMasatoshi Fujino
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internalsMakoto Kato
 
日本Androidの会のハンズオンセミナー資料(20130315)
日本Androidの会のハンズオンセミナー資料(20130315)日本Androidの会のハンズオンセミナー資料(20130315)
日本Androidの会のハンズオンセミナー資料(20130315)eijikushida
 

Similar to RoboVM (20)

iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 EastiOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
 
HTML5-pronama-study
HTML5-pronama-studyHTML5-pronama-study
HTML5-pronama-study
 
楽しいアプリ制作の会 #12 Windows Phone 開発
楽しいアプリ制作の会 #12 Windows Phone 開発楽しいアプリ制作の会 #12 Windows Phone 開発
楽しいアプリ制作の会 #12 Windows Phone 開発
 
20110212 Silverlight から Bing Maps に触れる
20110212 Silverlight から Bing Maps に触れる20110212 Silverlight から Bing Maps に触れる
20110212 Silverlight から Bing Maps に触れる
 
冬だからAndroid再入門
冬だからAndroid再入門冬だからAndroid再入門
冬だからAndroid再入門
 
Android Studioの魅力
Android Studioの魅力Android Studioの魅力
Android Studioの魅力
 
レゴ×Kinect実験指導書
レゴ×Kinect実験指導書レゴ×Kinect実験指導書
レゴ×Kinect実験指導書
 
Andoird版OpenCVのJavaサンプルを動かす
Andoird版OpenCVのJavaサンプルを動かすAndoird版OpenCVのJavaサンプルを動かす
Andoird版OpenCVのJavaサンプルを動かす
 
PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化
 
Web socketドロンくん その後-
Web socketドロンくん その後-Web socketドロンくん その後-
Web socketドロンくん その後-
 
OpenGLプログラミング
OpenGLプログラミングOpenGLプログラミング
OpenGLプログラミング
 
メディア・アート II 第1回: ガイダンス openFrameworks入門
メディア・アート II 第1回: ガイダンス openFrameworks入門メディア・アート II 第1回: ガイダンス openFrameworks入門
メディア・アート II 第1回: ガイダンス openFrameworks入門
 
Driverについて
DriverについてDriverについて
Driverについて
 
Xamarin で ReactiveUI を使ってみた
Xamarin で ReactiveUI を使ってみたXamarin で ReactiveUI を使ってみた
Xamarin で ReactiveUI を使ってみた
 
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvMedia Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
 
Titanium Mobile
Titanium MobileTitanium Mobile
Titanium Mobile
 
Spring BootでHello Worldのその先へ
Spring BootでHello Worldのその先へSpring BootでHello Worldのその先へ
Spring BootでHello Worldのその先へ
 
Android gameprogramming
Android gameprogrammingAndroid gameprogramming
Android gameprogramming
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internals
 
日本Androidの会のハンズオンセミナー資料(20130315)
日本Androidの会のハンズオンセミナー資料(20130315)日本Androidの会のハンズオンセミナー資料(20130315)
日本Androidの会のハンズオンセミナー資料(20130315)
 

Recently uploaded

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 

Recently uploaded (9)

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 

RoboVM

  • 3. Biographi • @tikemin • えすあいあー • JJUGとは今年の4月から • 本格的にJava始めたのもそのぐらい • Bio:Web/Embedded/Robo もの作りが趣味 13年11月9日土曜日
  • 5. What is RoboVM • Compiler translates Java bytecode into native ARM or x86 code • RoboVM 0.0.6 • Niklas Therning(@robovm) • Apache License v2.0 • Alpha software Java Translator 13年11月9日土曜日
  • 6. iOS app development according to java J2ObjC • An open-source command-line tool from Google • Translator tool Java code to Objective-C for the iOS platform • Does not provide any sort of platform-independent UI toolkit Apps that use J2ObjC 13年11月9日土曜日
  • 7. What is RoboVM • Warning! RoboVM is alpha software. It's not yet ready for production use. Expect to be bitten by bugs. If you find a bug, please report it. • It is not enough to use for iOS applications... But last update is 1 week ago 13年11月9日土曜日
  • 9. Hallo RoboVM How to Install(Eclipse) • install new Software 13年11月9日土曜日 http://download.robovm.org/eclipse/
  • 10. Hallo RoboVM • How to Install • command line tool http://download.robovm.org/robovm-0.0.6.tar.gz only donwload and unpack it 13年11月9日土曜日
  • 11. Hello RoboVM 1 public class HelloWorld { 2 public static void main(String[] args) { 3 System.out.println("Hello world!"); 4 } 5 } mkdir classes javac -d classes/ HelloWorld.java robovm-0.0.6/bin/robovm -verbose -cp classes/ HelloWorld Let s try Build 13年11月9日土曜日
  • 12. You ll wait too long time A simple class like HelloWorld References about 1500 classes directly or indirectly. RoboVM keeps a cache of compiled classes and only recompiles a class when it or any of its direct dependencies have changed. HelloWorld/lib/boot/robovm-rt.jar HelloWorld/lib/classes0.jar HelloWorld/HelloWorld Let's take a quick peek at the contents of the HelloWorld folder 13年11月9日土曜日
  • 13. iOS Demo 6 public class IOSDemo extends UIApplicationDelegate.Adapter { 7 8 private UIWindow window = null; 9 private int clickCount = 0; 10 11 @Override 12 public boolean didFinishLaunching(UIApplication application, 13 NSDictionary launchOptions) { 14 15 final UIButton button = UIButton.fromType(UIButtonType.RoundedRect); 16 button.setFrame(new CGRect(115.0f, 121.0f, 91.0f, 37.0f)); 17 button.setTitle("Click me!", UIControlState.Normal); 18 19 button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() { 20 @Override 21 public void onTouchUpInside(UIControl control, UIEvent event) { 22 button.setTitle("Click #" + (++clickCount), UIControlState.Normal); 23 } 24 }); 25 26 window = new UIWindow(UIScreen.getMainScreen().getBounds()); 27 window.setBackgroundColor(UIColor.lightGrayColor()); 28 window.addSubview(button); 29 30 window.makeKeyAndVisible(); 31 32 return true; 33 } ... 13年11月9日土曜日
  • 15. iphone application like very... 6 public class IOSDemo extends UIApplicationDelegate.Adapter { 7 11 12 13 14 @Override public boolean didFinishLaunching(UIApplication application, NSDictionary launchOptions) { UIButton create. 15 16 17 18 19 20 21 22 23 24 13年11月9日土曜日 final UIButton button = UIButton.fromType(UIButtonType.RoundedRect); button.setFrame(new CGRect(115.0f, 121.0f, 91.0f, 37.0f)); button.setTitle("Click me!", UIControlState.Normal); button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() { @Override public void onTouchUpInside(UIControl control, UIEvent event) { button.setTitle("Click #" + (++clickCount), UIControlState.Normal); } });
  • 16. Objective-c block 1 2 3 4 5 6 7 8 9 10 11 12 public static void main(String[] args) { Dispatch.Queue queue = Dispatch.getGlobalQueue( Dispatch.QUEUE_PRIORITY_DEFAULT, 0); for (int i = 1; i <= 5; i++) { final String msg = String.format("Block #%d", i); Dispatch.async(queue, new VoidBlock() { public void invoke() { System.out.println(msg); } }); } } u able to run tasks asynchronously like this 13年11月9日土曜日
  • 17. RoboVM java.util.* and java.lang.* can use. 1 2 3 4 5 6 final java.util.Date date = new java.util.Date(); //can't use SimpleDateFormat... String title = "JJUG 2013" + date.toString(); final UIButton button = UIButton.fromType(UIButtonType.RoundedRect); button.setFrame(new CGRect(30.0f, 121.0f, 250.0f, 37.0f)); button.setTitle(title, UIControlState.Normal); 1 2 3 4 5 6 7 8 9 10 11 final java.util.List<String> arrlist = arrlist.add("spring"); arrlist.add("fall"); 13年11月9日土曜日 new java.util.ArrayList<String> (); button.addOnTouchUpInsideListener(new UIControl.OnTouchUpInsideListener() { @Override public void onTouchUpInside(UIControl control, UIEvent event) { button.setTitle("Click #" + (++clickCount) + " " + arrlist.get(1), UIControlState.Normal); } });
  • 19. Simple Java FX Program Demo 13年11月9日土曜日
  • 20. JavaFX8 Java 1 MigPane root = new MigPane("gap 10, flowy", "[fill,grow,center]", "[]"); ... 4 5 6 7 8 13年11月9日土曜日 Scene scene = new Scene(root, 320, 480); scene.getStylesheets().add("/com/ultramixer/ javafx4ios/javafx4ios.css"); primaryStage.setTitle("JavaFX8 on iOS"); primaryStage.setScene(scene); primaryStage.show();
  • 21. RoboVM+JavaFX(CSS) Java 26 27 Label headline = new Label("JavaFX8 on iOS JJUG 2013 CCC Fall"); headline.setId("headline"); CSS 1 #headline { 2 -fx-font-size: 15; 3 } u can make a design with CSS 13年11月9日土曜日
  • 22. RoboVM+JavaFX(CSS) Java 40 41 42 43 44 45 46 47 48 49 Button b2 = new Button("JJUG!!"); b2.setId("btn"); b.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent actionEvent) { primaryStage.close(); } }); CSS 1 #btn { 2 -fx-background-radius: 10px; 3 -fx-background-color: linear-gradient(to bottom, 4 #BBBBCC 0%, #AAAAAA 100%); 5 } 13年11月9日土曜日
  • 24. Birck Breaker Splash UI is programmed by ImageView(Java) 1 package brickbreaker; 2 3 import javafx.animation.KeyFrame; 4 import javafx.animation.Timeline; 5 import javafx.event.ActionEvent; 6 import javafx.event.EventHandler; 7 import javafx.scene.Group; 8 import javafx.scene.Node; 9 import javafx.scene.Parent; 10 import javafx.scene.image.ImageView; 11 import javafx.scene.input.KeyEvent; 12 import javafx.scene.input.MouseEvent; 13 14 public class Splash extends Parent { 15 16 private static final int STATE_SHOW_TITLE = 0; 17 private static final int STATE_SHOW_STRIKE = 1; 18 private static final int STATE_SUN = 2; 19 20 private static final int SUN_AMPLITUDE_X = Config.SCREEN_WIDTH * 2 / 3; 21 private static final int SUN_AMPLITUDE_Y = Config.SCREEN_WIDTH / 2; 22 23 private ImageView background; 24 private ImageView brick; 25 private ImageView brickShadow; 26 private ImageView breaker; ... need the effort..x( 13年11月9日土曜日
  • 26. Setting forceLinkClasses • robovm.xml 1 <forceLinkClasses> 2 <pattern>javafx.scene.web.WebView</pattern> 3 </forceLinkClasses> currently experimental... 13年11月9日土曜日
  • 29. Using OpenGL Program sorry. i can not show you.. Demo 13年11月9日土曜日
  • 30. RoboVM + OpenGLES 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 private void update(GLKViewController controller) { if (increasing) { curRed += 1.0f * controller.getTimeSinceLastUpdate(); } else { curRed -= 1.0f * controller.getTimeSinceLastUpdate(); } if (curRed >= 1.0f) { curRed = 1.0f; increasing = false; } if (curRed <= 0.0f) { curRed = 0.0f; increasing = true; } } @Override public void draw(GLKView view, CGRect rect) { GL.glClearColor(curRed, 0.0f, 0.0f, 1.0f); GL.glClear(GL.GL_COLOR_BUFFER_BIT); } 13年11月9日土曜日
  • 31. RoboVM + OpenGLES 1 import org.robovm.rt.bro.*; 2 import org.robovm.rt.bro.annotation.*; 3 4 @Library("OpenGLES") 5 public class GL { 6 static { 7 Bro.bind(GL.class); 8 } 9 10 public static final int GL_DEPTH_BUFFER_BIT = 0x00000100; 11 public static final int GL_STENCIL_BUFFER_BIT = 0x00000400; 12 public static final int GL_COLOR_BUFFER_BIT = 0x00004000; 13 14 @Bridge 15 public static native void glClearColor(float red, 16 float green, float blue, float alpha); 17 18 @Bridge 19 public static native void glClear(int mask); 20 } I never thought a screen fading from black to red would look this great! It almost made me cry. :-) 13年11月9日土曜日
  • 34. Warning • iOS6 provisioning is expired... • Need to Xcode5.x(but Xcode4.x) • I can t demo... \(^o^)/OWATA 13年11月9日土曜日
  • 35. RoboVM Update v0.0.6 • The reason why it failed is that gdb has been removed from Xcode5 and the tool RoboVM used to launch on device (fruitstrap) relied on gdb 13年11月9日土曜日
  • 36. new RoboVM • libimobiledevice • libimobiledevice is a cross-platform software library that talks the protocols to support iPhone, iPod Touch, iPad and Apple TV®devices. switched to using libgpod 13年11月9日土曜日
  • 37. How to use in iOS7 • Get Java SE JDK 7 from Oracle • Get Xcode 5.0.1 from the Mac App Store • https://github.com/robovm/robovm/wiki/Hackingon-RoboVM I plan to try bonus comes out 13年11月9日土曜日
  • 39. Maven git git clone https://github.com/robovm/robovm-sample-ios-app.git cd robovm-sample-ios-app mvn robovm:iphone-sim To run on a device do mvn robovm:ios-device Your device has to be provisioned properly for this to work u can use Intellij IDEA 13年11月9日土曜日
  • 40. but i recommend eclipse • Why? • Easy to install (only add packege..) • Offical update early so, i recommend eclipse 13年11月9日土曜日
  • 42. 実は... • こんなやりとりが... @tikemin @skrb It would be great to have these #JavaFX RoboVM slides translated to English http:// t.co/Izvtzywzjl」 ということで英語の資料に 13年11月9日土曜日
  • 43. 実は... • こんなやりとりが... @tikemin @skrb It would be great to have these #JavaFX RoboVM slides translated to English http:// t.co/Izvtzywzjl」 (Bio: Java/JavaFX/IoT developer, author and speaker) ということで英語の資料に 13年11月9日土曜日
  • 45. Summary • RoboVM • Compiler translates Java bytecode into native ARM or x86 code • RoboVM+JavaFX • RoboVM+OpenGLES • iOS7(Java7) Future is very fun! 13年11月9日土曜日
  • 47. libGDX • Desktop/Android/iOS/HTML5 Java game development framework • • • • • • • Windows Linux Max OS X Android (+1.5) iOS Java Applet (requires JVM to be installed) Javascript/WebGL (Chrome, Safari, Opera, Firefox, IE via Google Chrome Frame) 406 games listed in this gallery 13年11月9日土曜日
  • 48. git hub • robovm-llvm(Only .md file) • https://github.com/robovm/robovm-llvm • ObjC2RoboVM • It is a parser that creates RoboVM bindings from CLang AST dumps Future is very fun! 13年11月9日土曜日