Difference between revisions of "Statistical Algorithms Importer: Java Project"
From Gcube Wiki
Line 19: | Line 19: | ||
[[Image:StatisticalAlgorithmsImporter_JavaBlackBox4.png|thumb|center|800px|Java Create, SAI]] | [[Image:StatisticalAlgorithmsImporter_JavaBlackBox4.png|thumb|center|800px|Java Create, SAI]] | ||
+ | == Example Code == | ||
+ | :Java code in sample: | ||
+ | |||
+ | <pre style="display:block;font-family:monospace;white-space:pre;margin:1em 0;"> | ||
+ | # | ||
+ | # author Giancarlo Panichi | ||
+ | # | ||
+ | # | ||
+ | import java.io.File; | ||
+ | import java.io.FileWriter; | ||
+ | |||
+ | public class SimpleProducer | ||
+ | { | ||
+ | public static void main(String[] args) | ||
+ | { | ||
+ | try | ||
+ | { | ||
+ | FileWriter fw = new FileWriter(new File("program.txt")); | ||
+ | fw.write("Check: " + args[0]); | ||
+ | fw.close(); | ||
+ | } | ||
+ | catch (Exception e) | ||
+ | { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
Revision as of 14:08, 10 October 2017
- This page explains how to create a Python project using the Statistical Algorithms Importer (SAI) portlet.
Project Configuration
- Define project's metadata
- Add input and output parameters and click on "Set Code" to indicate the main file to execute (i.e. the .jar file)
- Add information about the running environment (e.g. Java version etc.)
- After the software creation phase a Main.R file and a Taget folder are created
Example Code
- Java code in sample:
# # author Giancarlo Panichi # # import java.io.File; import java.io.FileWriter; public class SimpleProducer { public static void main(String[] args) { try { FileWriter fw = new FileWriter(new File("program.txt")); fw.write("Check: " + args[0]); fw.close(); } catch (Exception e) { e.printStackTrace(); } } }