3 |
4 | extern "C"
5 | JNIEXPORT jstring JNICALL
6 | Java_com_example_william_trabalho_MainActivity_stringFromJNI(
7 | JNIEnv* env,
8 | jobject /* this */) {
9 | std::string hello = "Hello from C++";
10 | return env->NewStringUTF(hello.c_str());
11 | }
12 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gui/DesenhoSimples.java:
--------------------------------------------------------------------------------
1 | import java.awt.Graphics;
2 | import javax.swing.JPanel;
3 |
4 | public class DesenhoSimples extends JPanel{
5 | //método que desenha o painel
6 | public void paintComponent( Graphics g) {
7 | super.paintComponent(g);
8 |
9 | int width = getWidth();
10 | int height = getHeight();
11 |
12 | //faz o desenho
13 | g.drawLine(0, 0, width, height);
14 | g.drawLine(0, height, width, 0);
15 | g.drawLine(width/2, 0,width/2, height);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/gui/ExibeCaixaDialago.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JOptionPane;
2 |
3 |
4 | public class ExibeCaixaDialago {
5 | public static void main (String args []){
6 |
7 | //crio e armazeno a variavel name
8 | String name = JOptionPane.showInputDialog("Nome ?");
9 |
10 | //cria a menssagem
11 | String menssagem = String.format(" Welcome, %s dark force side !", name);
12 |
13 | //exibe a menssagem
14 | JOptionPane.showMessageDialog(null, menssagem);
15 | }
16 |
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/activity_cinemark.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/activity_cinespaco.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/activity_cinesystem.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/gui/DesenhoSimplesPreenchido.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JPanel;
2 | import java.awt.Graphics;
3 | import java.awt.Color;
4 |
5 | public class DesenhoSimplesPreenchido extends JPanel {
6 | public void paintComponent(Graphics g){
7 | super.paintComponent(g);
8 |
9 | //desenha o rosto
10 | g.setColor(Color.RED);
11 | g.fillOval(10, 10, 200, 200);
12 |
13 | //desenha os olhos
14 | g.setColor(Color.BLACK);
15 | g.fillOval(55, 65, 30, 30);
16 | g.fillOval(135, 65, 30, 30);
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/test/java/com/example/william/trabalho/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import org.junit.Test;
4 |
5 | /**
6 | * Example local unit test, which will execute on the development machine (host).
7 | *
8 | * @see Testing documentation
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void additionIsCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/handle_exceptions/TryCatch.java:
--------------------------------------------------------------------------------
1 | public class TryCatch {
2 | public static void main(String[] args) {
3 |
4 | try{
5 | int[] vetor = new int[4];
6 | System.out.println("antes da exception");
7 |
8 | vetor[5] = 10;
9 | System.out.println("esse texto nao sera impresso");
10 |
11 | }catch(ArrayIndexOutOfBoundsException exception){
12 | System.out.println("erro de acesso ao array (posicao invalida)");
13 | }
14 | System.out.println("linha executada depois da exception (o programa nao parou !)");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gui/DesenhoSimplesPreenchidoTest.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JFrame;
2 |
3 | public class DesenhoSimplesPreenchidoTest {
4 | public static void main(String[] args) {
5 | DesenhoSimplesPreenchido painelDeDesenho = new DesenhoSimplesPreenchido();
6 | JFrame frame = new JFrame();
7 |
8 | //visible
9 | frame.setVisible(true);
10 |
11 | //close
12 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
13 |
14 | //size
15 | frame.setSize(230, 250);
16 |
17 | //add o painel no frame
18 | frame.add(painelDeDesenho);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/gui/DesenhoSimplesTest.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JFrame;
2 |
3 | public class DesenhoSimplesTest {
4 | public static void main(String[] args) {
5 |
6 | //chama a classe que conte o desenho
7 | DesenhoSimples painel = new DesenhoSimples();
8 |
9 | JFrame aplicacao = new JFrame();
10 |
11 | //confgura o frame para ser fechado
12 | aplicacao.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
13 |
14 | //configura o frame visivel
15 | aplicacao.setVisible(true);
16 |
17 | aplicacao.add(painel);
18 | aplicacao.setSize(250,250);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/handle_exceptions/TryCatchFinally.java:
--------------------------------------------------------------------------------
1 | // The finally statement lets you execute code,
2 | // after try...catch, regardless of the result:
3 |
4 | public class TryCatchFinally {
5 | public static void main(String[] args) {
6 |
7 | try {
8 | int[] myNumbers = {1, 2, 3};
9 | System.out.println(myNumbers[10]);
10 |
11 | } catch (Exception e) {
12 | System.out.println("Something went wrong.");
13 |
14 | } finally {
15 | // every time it runs
16 | System.out.println("The 'try catch' is finished.");
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/trabalho-app_android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Log file
2 | *.log
3 |
4 | # BlueJ files
5 | *.ctxt
6 |
7 | # Mobile Tools for Java (J2ME)
8 | .mtj.tmp/
9 |
10 | # Package Files #
11 | *.jar
12 | *.war
13 | *.nar
14 | *.ear
15 | *.zip
16 | *.tar.gz
17 | *.rar
18 |
19 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
20 | hs_err_pid*
21 |
22 | # Java
23 | *.class
24 | *.jar
25 | *.war
26 | *.ear
27 |
28 | # Eclipse
29 | .project
30 | .classpath
31 | .settings
32 |
33 | # Idea
34 | .idea
35 | *.iml
36 | *.iws
37 | *.ipr
38 |
39 | # OS
40 | Thumbs.db
41 | .DS_Store
42 |
43 | # Gradle
44 | .gradle
45 | !gradle-wrapper.jar
46 |
47 | # Maven
48 | target
49 |
50 | # Build
51 | out
52 | build
53 | bin/*
54 |
55 | # IDEs and editors
56 | .vscode/*
57 | .idea/*
--------------------------------------------------------------------------------
/trabalho-app_android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gui/RetanguloEOvaisTest.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JFrame;
2 | import javax.swing.JOptionPane;
3 |
4 | public class RetanguloEOvaisTest {
5 |
6 | public static void main(String[] args) {
7 |
8 | String input = JOptionPane.showInputDialog(null, "1 = retangulo\n" + "2 = oval\n"
9 | + "3 = circulos concntricos\n" + "4 = espiral quadrada");
10 | int choise = Integer.parseInt(input);
11 |
12 | //objeto que contem o desenho (painel)
13 | RetanguloEOvais painel = new RetanguloEOvais(choise);
14 |
15 | //objeto frame que recebe o painel
16 | JFrame frame = new JFrame();
17 |
18 | //visible
19 | frame.setVisible(true);
20 |
21 | //CLOSE_ON_DESCRITPION
22 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
23 |
24 | //Size
25 | frame.setSize(400,400);
26 |
27 | //O objeto frame recebe o objeto painel
28 | frame.add(painel);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/androidTest/java/com/example/william/trabalho/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 |
11 | /**
12 | * Instrumentation test, which will execute on an Android device.
13 | *
14 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 | @Test
19 | public void useAppContext() throws Exception {
20 | // Context of the app under test.
21 | Context appContext = InstrumentationRegistry.getTargetContext();
22 |
23 | assertEquals("com.example.william.trabalho", appContext.getPackageName());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/favoritos.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
23 |
--------------------------------------------------------------------------------
/application_server/README.md:
--------------------------------------------------------------------------------
1 | # Criação de um Servidor de Aplicação
2 |
3 | 1. Faça o download da versão Java EE no WildFly
4 | ```bash
5 | wget https://download.jboss.org/wildfly/17.0.1.Final/wildfly-17.0.1.Final.zip
6 | ```
7 |
8 | 2. Descompacte
9 | ```bash
10 | unzip wildfly-17.0.1.Final.zip
11 | ```
12 |
13 | 3. Clique em `Add Configuration`
14 |
15 |
16 |
17 |
18 | 4. Clique no menu esquerdo em `JBoss Server > Unnamed`
19 |
20 |
21 |
22 |
23 | 5. Selecione o servidor
24 |
25 |
26 |
27 |
28 | 6. Renomei a aplicação, selecione a versão do java, na aba deplyment, selecione o war (artefato) e por fim clique em apply e ok.
29 |
30 |
31 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/release/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | YOUR_KEY_HERE
21 |
22 |
23 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.TextView;
6 |
7 | public class MainActivity extends AppCompatActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_main);
13 |
14 | // Example of a call to a native method
15 | TextView tv = (TextView) findViewById(R.id.sample_text);
16 | tv.setText(stringFromJNI());
17 | }
18 |
19 | /**
20 | * A native method that is implemented by the 'native-lib' native library,
21 | * which is packaged with this application.
22 | */
23 | public native String stringFromJNI();
24 |
25 | // Used to load the 'native-lib' library on application startup.
26 | static {
27 | System.loadLibrary("native-lib");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/william/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/cinema.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Bruno Campos
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.
22 |
--------------------------------------------------------------------------------
/serialization/src/serializacao/Personagem.java:
--------------------------------------------------------------------------------
1 | package serializacao;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Personagem implements Serializable
6 | {
7 | private int account;
8 | private String firstName;
9 | private String lastName;
10 | private double balance;
11 |
12 | // set
13 | public void setAccount( int acct )
14 | {
15 | account = acct;
16 | }
17 |
18 | // get
19 | public int getAccount()
20 | {
21 | return account;
22 | }
23 |
24 | // set
25 | public void setFirstName( String first )
26 | {
27 | firstName = first;
28 | }
29 |
30 | // get
31 | public String getFirstName()
32 | {
33 | return firstName;
34 | }
35 |
36 | // set
37 | public void setLastName( String last )
38 | {
39 | lastName = last;
40 | }
41 |
42 | // get
43 | public String getLastName()
44 | {
45 | return lastName;
46 | }
47 |
48 | // set
49 | public void setBalance( double bal )
50 | {
51 | balance = bal;
52 | }
53 |
54 | // get
55 | public double getBalance()
56 | {
57 | return balance;
58 | }
59 | }
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/debug/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 | YOUR_KEY_HERE
25 |
26 |
27 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/Cinema.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 |
4 | public class Cinema {
5 |
6 | private String nome;
7 | private String localizacao;
8 |
9 | public static Cinema createCinema(){
10 | Cinema cinema = new Cinema();
11 | cinema.setLocalizacao("Iguatemi");
12 | cinema.setNome("Cinesystem");
13 |
14 | return cinema;
15 | }
16 |
17 | public static Cinema createCinema2(){
18 | Cinema cinema = new Cinema();
19 | cinema.setLocalizacao("Floripa Shopping");
20 | cinema.setNome("Cinemark");
21 | return cinema;
22 | }
23 |
24 | public static Cinema createCinema3(){
25 | Cinema cinema = new Cinema();
26 | cinema.setLocalizacao("Beira Mar");
27 | cinema.setNome("Cinespaço");
28 | return cinema;
29 | }
30 |
31 |
32 |
33 | public String getNome() {
34 | return nome;
35 | }
36 |
37 | public void setNome(String nome) {
38 | this.nome = nome;
39 | }
40 |
41 | public String getLocalizacao() {
42 | return localizacao;
43 | }
44 |
45 | public void setLocalizacao(String localizacao) {
46 | this.localizacao = localizacao;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/gui/RetanguloEOvais.java:
--------------------------------------------------------------------------------
1 | import javax.swing.JPanel;
2 | import java.awt.Graphics;
3 |
4 | public class RetanguloEOvais extends JPanel{
5 |
6 | private int choice;
7 |
8 | //construtor
9 | public RetanguloEOvais (int escolha){
10 | this.choice = escolha;
11 | }
12 |
13 | //método obrigatório para exibir o painel
14 | public void paintComponent (Graphics g){
15 | super.paintComponent(g);
16 |
17 | int height = getHeight();
18 | int width = getWidth();
19 |
20 | for(int i = 0; i < 15; i++){
21 | switch (choice){
22 | case 1:
23 | g.drawRect(10 + i*10, 10 + i*10, 50 + i *10, 50 + i *10);
24 | break;
25 |
26 | case 2 :
27 | g.drawOval(10 + i*10, 10+ i*10, 50 + i *10, 50 + i *10);
28 | break;
29 |
30 | case 3 :
31 | g.drawOval(width/2-10*i, height/2-10*i, 20*i, 20*i);
32 | break;
33 |
34 | case 4:
35 | g.drawLine(width/2+10*i, height/2-10*i, width/2+10*i, height/2+10*(i+1));
36 | g.drawLine(width/2+10*i, height/2+10*(i+1), width/2-10*(i+1), height/2+10*(i+1));
37 | g.drawLine(width/2-10*(i+1), height/2+10*(i+1), width/2-10*(i+1), height/2-10*(i+1));
38 | g.drawLine(width/2-10*(i+1), height/2-10*(i+1), width/2+10*(i+1), height/2-10*(i+1));
39 |
40 | default:
41 | break;
42 |
43 | }
44 | }
45 |
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "26.0.0"
6 | defaultConfig {
7 | applicationId "com.example.william.trabalho"
8 | minSdkVersion 16
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | externalNativeBuild {
14 | cmake {
15 | cppFlags "-frtti -fexceptions"
16 | }
17 | }
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | externalNativeBuild {
26 | cmake {
27 | path "CMakeLists.txt"
28 | }
29 | }
30 | }
31 |
32 | dependencies {
33 | compile fileTree(dir: 'libs', include: ['*.jar'])
34 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
35 | exclude group: 'com.android.support', module: 'support-annotations'
36 | })
37 | compile 'com.android.support:appcompat-v7:25.3.1'
38 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
39 | compile 'com.google.android.gms:play-services-maps:11.0.0'
40 | testCompile 'junit:junit:4.12'
41 | }
42 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
27 |
28 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/serialization/src/SalvandoEmArquivoDeTexto/TextFile.java:
--------------------------------------------------------------------------------
1 | package salvandoEmArquivoDeTexto;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.BufferedWriter;
5 | import java.io.File;
6 | import java.io.FileNotFoundException;
7 | import java.io.FileReader;
8 | import java.io.FileWriter;
9 | import java.io.IOException;
10 |
11 | public class TextFile {
12 | // open/create the file
13 | File arquivo = new File("arquivoDeTexto.txt");
14 |
15 | public void writeFile() {
16 |
17 | try {
18 | //fluxo de conexao para escrita
19 | FileWriter escreveNoArquivo = new FileWriter (arquivo);
20 | //BufferedWriter garante que somente sera escrito quando o buffer estiver cheio
21 | //encadeado ao FileWrter
22 | BufferedWriter bufferDeEscrita = new BufferedWriter(escreveNoArquivo);
23 |
24 | escreveNoArquivo.write("primeira linha\n");
25 | escreveNoArquivo.write("segunda linha");
26 | System.out.println("gravado !");
27 |
28 | escreveNoArquivo.close();
29 |
30 | } catch (IOException e) {
31 | e.printStackTrace();
32 | }
33 | }
34 |
35 | public void readFile() {
36 | try {
37 | //fluxo de conexao para leitura
38 | FileReader leOArquivo = new FileReader(arquivo);
39 | //BufferedReader melhora a eficiencia
40 | //encadeado ao FileReader
41 | BufferedReader bufferDeLeitura = new BufferedReader(leOArquivo);
42 | //armazena cada linha
43 | String line = null;
44 | try {
45 | while ((line = bufferDeLeitura.readLine()) != null) {
46 | System.out.println(line);
47 | }
48 | leOArquivo.close();
49 | } catch (IOException e) {
50 | e.printStackTrace();
51 | }
52 |
53 | } catch (FileNotFoundException e1) {
54 | e1.printStackTrace();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/serialization/src/serializacao/SerializadorEDesserializador.java:
--------------------------------------------------------------------------------
1 | package serializacao;
2 |
3 | import java.io.FileInputStream;
4 | import java.io.FileNotFoundException;
5 | import java.io.FileOutputStream;
6 | import java.io.IOException;
7 | import java.io.ObjectInputStream;
8 | import java.io.ObjectOutputStream;
9 |
10 | public class SerializadorEDesserializador {
11 | Personagem personagemUm, personagemDois;
12 |
13 | public void serializar() {
14 | try {
15 | //cria e abre um arquivo
16 | FileOutputStream fileStream = new FileOutputStream("personagens.ser");
17 |
18 | //cria um fluxo de gravacao de objetos
19 | ObjectOutputStream gravador = new ObjectOutputStream(fileStream);
20 |
21 | //serializa os objetos
22 | gravador.writeObject(personagemUm);
23 | gravador.writeObject(personagemDois);
24 |
25 | gravador.close();
26 | } catch (FileNotFoundException e) {
27 | e.printStackTrace();
28 | } catch (IOException e) {
29 | e.printStackTrace();
30 | }
31 | }
32 |
33 | public void desserializador() throws ClassNotFoundException{
34 | try {
35 | //abre o arquivo
36 | //caso nao exista "personagens.ser" eh capturado uma excecao
37 | FileInputStream fileStream = new FileInputStream("personagens.ser");
38 |
39 | //cria um fluxo de leitura de objetos
40 | ObjectInputStream leitor = new ObjectInputStream(fileStream);
41 |
42 | //desserializa os objetos
43 | Object one = leitor.readObject();
44 | Object two = leitor.readObject();
45 |
46 | Personagem personagemUm = (Personagem) one;
47 | Personagem personagemDois = (Personagem) two;
48 |
49 | leitor.close();
50 | } catch (FileNotFoundException e) {
51 | e.printStackTrace();
52 | } catch (IOException e) {
53 | e.printStackTrace();
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html
3 |
4 | # Sets the minimum version of CMake required to build the native library.
5 |
6 | cmake_minimum_required(VERSION 3.4.1)
7 |
8 | # Creates and names a library, sets it as either STATIC
9 | # or SHARED, and provides the relative paths to its source code.
10 | # You can define multiple libraries, and CMake builds them for you.
11 | # Gradle automatically packages shared libraries with your APK.
12 |
13 | add_library( # Sets the name of the library.
14 | native-lib
15 |
16 | # Sets the library as a shared library.
17 | SHARED
18 |
19 | # Provides a relative path to your source file(s).
20 | src/main/cpp/native-lib.cpp )
21 |
22 | # Searches for a specified prebuilt library and stores the path as a
23 | # variable. Because CMake includes system libraries in the search path by
24 | # default, you only need to specify the name of the public NDK library
25 | # you want to add. CMake verifies that the library exists before
26 | # completing its build.
27 |
28 | find_library( # Sets the name of the path variable.
29 | log-lib
30 |
31 | # Specifies the name of the NDK library that
32 | # you want CMake to locate.
33 | log )
34 |
35 | # Specifies libraries CMake should link to your target library. You
36 | # can link multiple libraries, such as libraries you define in this
37 | # build script, prebuilt third-party libraries, or system libraries.
38 |
39 | target_link_libraries( # Specifies the target library.
40 | native-lib
41 |
42 | # Links the target library to the log library
43 | # included in the NDK.
44 | ${log-lib} )
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/Cinemark.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import android.support.v4.app.FragmentActivity;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.gms.maps.CameraUpdateFactory;
7 | import com.google.android.gms.maps.GoogleMap;
8 | import com.google.android.gms.maps.OnMapReadyCallback;
9 | import com.google.android.gms.maps.SupportMapFragment;
10 | import com.google.android.gms.maps.model.LatLng;
11 | import com.google.android.gms.maps.model.MarkerOptions;
12 |
13 | public class Cinemark extends FragmentActivity implements OnMapReadyCallback {
14 |
15 | public GoogleMap mMap;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_cinemark);
21 | // Obtain the SupportMapFragment and get notified when the map is ready to be used.
22 | SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
23 | .findFragmentById(R.id.map);
24 | mapFragment.getMapAsync(this);
25 | }
26 |
27 |
28 | /**
29 | * Manipulates the map once available.
30 | * This callback is triggered when the map is ready to be used.
31 | * This is where we can add markers or lines, add listeners or move the camera. In this case,
32 | * we just add a marker near Sydney, Australia.
33 | * If Google Play services is not installed on the device, the user will be prompted to install
34 | * it inside the SupportMapFragment. This method will only be triggered once the user has
35 | * installed Google Play services and returned to the app.
36 | */
37 | @Override
38 | public void onMapReady(GoogleMap googleMap) {
39 | mMap = googleMap;
40 |
41 | // Add a marker in Sydney and move the camera
42 | LatLng sydney = new LatLng(-34, 151);
43 | mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
44 | mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/Cinesystem.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.FragmentActivity;
5 | import com.google.android.gms.maps.CameraUpdateFactory;
6 | import com.google.android.gms.maps.GoogleMap;
7 | import com.google.android.gms.maps.OnMapReadyCallback;
8 | import com.google.android.gms.maps.SupportMapFragment;
9 | import com.google.android.gms.maps.model.LatLng;
10 | import com.google.android.gms.maps.model.MarkerOptions;
11 |
12 | public class Cinesystem extends FragmentActivity implements OnMapReadyCallback {
13 |
14 | public GoogleMap mMap;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_cinesystem);
20 | // Obtain the SupportMapFragment and get notified when the map is ready to be used.
21 | SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
22 | .findFragmentById(R.id.map);
23 | mapFragment.getMapAsync(this);
24 | }
25 |
26 |
27 | /**
28 | * Manipulates the map once available.
29 | * This callback is triggered when the map is ready to be used.
30 | * This is where we can add markers or lines, add listeners or move the camera. In this case,
31 | * we just add a marker near Sydney, Australia.
32 | * If Google Play services is not installed on the device, the user will be prompted to install
33 | * it inside the SupportMapFragment. This method will only be triggered once the user has
34 | * installed Google Play services and returned to the app.
35 | */
36 | @Override
37 | public void onMapReady(GoogleMap googleMap) {
38 | mMap = googleMap;
39 |
40 | // Add a marker in Sydney and move the camera
41 | LatLng sydney = new LatLng(-34, 151);
42 | mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
43 | mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/Cinespaco.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | import android.support.v4.app.FragmentActivity;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.gms.maps.CameraUpdateFactory;
7 | import com.google.android.gms.maps.GoogleMap;
8 | import com.google.android.gms.maps.OnMapReadyCallback;
9 | import com.google.android.gms.maps.SupportMapFragment;
10 | import com.google.android.gms.maps.model.LatLng;
11 | import com.google.android.gms.maps.model.MarkerOptions;
12 |
13 | public class Cinespaco extends FragmentActivity implements OnMapReadyCallback {
14 |
15 | public GoogleMap mMap;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_cinespaco);
21 | // Obtain the SupportMapFragment and get notified when the map is ready to be used.
22 | SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
23 | .findFragmentById(R.id.map);
24 | mapFragment.getMapAsync(this);
25 | }
26 |
27 |
28 | /**
29 | * Manipulates the map once available.
30 | * This callback is triggered when the map is ready to be used.
31 | * This is where we can add markers or lines, add listeners or move the camera. In this case,
32 | * we just add a marker near Sydney, Australia.
33 | * If Google Play services is not installed on the device, the user will be prompted to install
34 | * it inside the SupportMapFragment. This method will only be triggered once the user has
35 | * installed Google Play services and returned to the app.
36 | */
37 | @Override
38 | public void onMapReady(GoogleMap googleMap) {
39 | mMap = googleMap;
40 |
41 | // Add a marker in Sydney and move the camera
42 | LatLng sydney = new LatLng(-34, 151);
43 | mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
44 | mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
34 |
37 |
38 |
41 |
44 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/trabalho-app_android/app/src/main/java/com/example/william/trabalho/Filme.java:
--------------------------------------------------------------------------------
1 | package com.example.william.trabalho;
2 |
3 | /**
4 | * Created by william on 14/06/17.
5 | */
6 |
7 | public class Filme {
8 |
9 | private String titulo;
10 | private String diretor;
11 | private String elenco;
12 | private int poster;
13 | private String sinopse;
14 | private String duracao;
15 | private String horarios;
16 | private String linguagem;
17 | private String trailer;
18 | private boolean favorito;
19 |
20 |
21 | public boolean isFavorito() {
22 | return favorito;
23 | }
24 |
25 | public void setFavorito(boolean favorito) {
26 | this.favorito = favorito;
27 | }
28 |
29 | public String getHorarios() {
30 | return horarios;
31 | }
32 |
33 | public void setHorarios(String horarios) {
34 | this.horarios = horarios;
35 | }
36 |
37 | public String getTitulo() {
38 | return titulo;
39 | }
40 |
41 | public void setTitulo(String titulo) {
42 | this.titulo = titulo;
43 | }
44 |
45 | public String getDiretor() {
46 | return diretor;
47 | }
48 |
49 | public void setDiretor(String diretor) {
50 | this.diretor = diretor;
51 | }
52 |
53 | public String getElenco() {
54 | return elenco;
55 | }
56 |
57 | public void setElenco(String elenco) {
58 | this.elenco = elenco;
59 | }
60 |
61 | public int getPoster() {
62 | return poster;
63 | }
64 |
65 | public void setPoster(int poster) {
66 | this.poster = poster;
67 | }
68 |
69 | public String getSinopse() {
70 | return sinopse;
71 | }
72 |
73 | public void setSinopse(String sinopse) {
74 | this.sinopse = sinopse;
75 | }
76 |
77 | public String getDuracao() {
78 | return duracao;
79 | }
80 |
81 | public void setDuracao(String duracao) {
82 | this.duracao = duracao;
83 | }
84 |
85 | public String getLinguagem() {
86 | return linguagem;
87 | }
88 |
89 | public void setLinguagem(String linguagem) {
90 | this.linguagem = linguagem;
91 | }
92 |
93 | public String getTrailer() {
94 | return trailer;
95 | }
96 |
97 | public void setTrailer(String trailer) {
98 | this.trailer = trailer;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Desenvolvimento de Sistemas Orientado à Objetos
2 | 
3 | 
4 |
5 | ## Requirements
6 | | Requisite | Version |
7 | |--------------------------------------------------------------------------|----------------|
8 | | [Java](https://www.java.com/en/download/manual.jsp) | 1.8.0_282 |
9 | | [Intellij IDEA](https://www.jetbrains.com/idea/download/#section=linux) | 2020.1 |
10 | | [Gradle](https://gradle.org/install/) | 7.3.1 |
11 | | [WildFly](https://www.wildfly.org/) | 25.0.1.Final |
12 | | [MySQL](https://www.mysql.com/) | 5.7 |
13 |
14 |
15 | ### Conteúdos
16 | - [Criar um servidor de aplicação JBoss](application_server/)
17 | - [Aplicação Android - Próximos filmes](trabalho-app_android/)
18 | - [Conexão com banco de dados - JDBC](https://github.com/brunocampos01/becoming-an-expert-data/tree/master/storage/database-cookbook/relational)
19 | - [Iterfaces gráficas - GUI](gui/)
20 | - [Serialização](serialization/)
21 | - [Exceptions](handle_exceptions/)
22 |
23 | ---
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/trabalho-app_android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/trabalho-app_android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------