Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2310 > unrolled thread

Need help when using Google Script

Started byJohn Dildy <jdildy85@gmail.com>
First post2012-12-02 14:27 -0800
Last post2012-12-03 10:57 -0800
Articles 11 — 4 participants

Back to article view | Back to comp.lang.java.help


Contents

  Need help when using Google Script John Dildy <jdildy85@gmail.com> - 2012-12-02 14:27 -0800
    Re: Need help when using Google Script John Dildy <jdildy85@gmail.com> - 2012-12-02 14:27 -0800
    Re: Need help when using Google Script Joerg Meier <joergmmeier@arcor.de> - 2012-12-03 00:16 +0100
      Re: Need help when using Google Script John Dildy <jdildy85@gmail.com> - 2012-12-02 15:44 -0800
        Re: Need help when using Google Script markspace <-@.> - 2012-12-02 18:00 -0800
          Re: Need help when using Google Script John Dildy <jdildy85@gmail.com> - 2012-12-03 02:30 -0800
        Re: Need help when using Google Script Joerg Meier <joergmmeier@arcor.de> - 2012-12-03 12:24 +0100
    Re: Need help when using Google Script John Dildy <jdildy85@gmail.com> - 2012-12-03 03:54 -0800
      Re: Need help when using Google Script markspace <-@.> - 2012-12-03 08:27 -0800
    Re: Need help when using Google Script Roedy Green <see_website@mindprod.com.invalid> - 2012-12-03 10:55 -0800
    Re: Need help when using Google Script Roedy Green <see_website@mindprod.com.invalid> - 2012-12-03 10:57 -0800

#2310 — Need help when using Google Script

FromJohn Dildy <jdildy85@gmail.com>
Date2012-12-02 14:27 -0800
SubjectNeed help when using Google Script
Message-ID<b1bcd9f8-31a1-49af-b3c4-dc0513e9c569@googlegroups.com>
I have entered this code HelloWorld code:

/*
Java Hello World example.
*/
 
public class HelloWorld{
 
  public static void main(String args[]){
 
    /*
    Use System.out.println() to print on console.
    */
    System.out.println("Hello World!");
 
  }
 
}
 
/*
 
OUTPUT of the above given Java Hello World Example would be :
 
Hello World !
 
*/

And I got an error of I need a semicolon on line 5

[toc] | [next] | [standalone]


#2311

FromJohn Dildy <jdildy85@gmail.com>
Date2012-12-02 14:27 -0800
Message-ID<1f0ec716-5ac8-4fdc-a3c1-ff039f339587@googlegroups.com>
In reply to#2310
Anyone know what is wrong?

[toc] | [prev] | [next] | [standalone]


#2312

FromJoerg Meier <joergmmeier@arcor.de>
Date2012-12-03 00:16 +0100
Message-ID<1ihtxxeggaw9u$.110em4n21zsfh.dlg@40tude.net>
In reply to#2310
On Sun, 2 Dec 2012 14:27:15 -0800 (PST), John Dildy wrote:

> And I got an error of I need a semicolon on line 5

You need to provide more details of how you tried to compile the example
and the actual error you got, with copy and paste, or a screenshot, or
whatever.

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [prev] | [next] | [standalone]


#2313

FromJohn Dildy <jdildy85@gmail.com>
Date2012-12-02 15:44 -0800
Message-ID<1d3c96f1-56ba-468a-a971-ae052385f63d@googlegroups.com>
In reply to#2312
Here is the screenshot URL:

https://docs.google.com/file/d/0BzcwX2Ek3ZmMUWNBNTZsTFdjeTA/edit

I have typed correctly unless there is some type of error I am unaware of.

The only error I keep getting is that I am required an semicolon (;) on line 5 when I attempt to run the code.

[toc] | [prev] | [next] | [standalone]


#2314

Frommarkspace <-@.>
Date2012-12-02 18:00 -0800
Message-ID<k9h13h$jsb$1@dont-email.me>
In reply to#2313
On 12/2/2012 3:44 PM, John Dildy wrote:
> Here is the screenshot URL:
>
> https://docs.google.com/file/d/0BzcwX2Ek3ZmMUWNBNTZsTFdjeTA/edit


That's like the worst screen shot ever.  The resolution is so low as to 
be almost unreadable.  Seriously how do you expect anyone to help you 
with that crappy thing?  Are you trolling us?

Anyway, your file name ends in .gs, but that's Java code which needs to 
end in .java.  I think you're confusing your tool with the wrong 
language or the wrong file name extension.

I don't recognize the tool you're using.  Can you tell us what it is? 
Got a link to it?

[toc] | [prev] | [next] | [standalone]


#2315

FromJohn Dildy <jdildy85@gmail.com>
Date2012-12-03 02:30 -0800
Message-ID<ed13f8c2-41a0-4231-9d6d-8d0c5f1bb2ab@googlegroups.com>
In reply to#2314
It is Google Script as I have said in the title.

The link/URL is script.google.com

I would have sent a URL to direct to my code but it doesn't save properly.

[toc] | [prev] | [next] | [standalone]


#2316

FromJoerg Meier <joergmmeier@arcor.de>
Date2012-12-03 12:24 +0100
Message-ID<p8ih63w8myk9$.op140egg4lv3.dlg@40tude.net>
In reply to#2313
On Sun, 2 Dec 2012 15:44:18 -0800 (PST), John Dildy wrote:

> Here is the screenshot URL:

> https://docs.google.com/file/d/0BzcwX2Ek3ZmMUWNBNTZsTFdjeTA/edit

> I have typed correctly unless there is some type of error I am unaware of.

> The only error I keep getting is that I am required an semicolon (;) on line 5 when I attempt to run the code.

From the description of Google Script: "Google Apps Script is a JavaScript
cloud scripting language".

Again, dude, Javascript is not Java. You need to go to a Javascript
newsgroup if you want to learn Javascript, or alternatively, you need to
stop trying to do Javascript things with Java. You can't try to compile a
Java program with a Javscript compiler such as Google Script any more than
you could use a C compiler.

Pro-Tip: the file type ".js" stands for JavaScript. JavaScript, again, is
not Java. The file type for Java is .java. ".gs" is Google Script, which
builds upon Javascript, and has nothing to do with Java.

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [prev] | [next] | [standalone]


#2317

FromJohn Dildy <jdildy85@gmail.com>
Date2012-12-03 03:54 -0800
Message-ID<32edcdd7-b231-4423-be5e-e85ea296210d@googlegroups.com>
In reply to#2310
Is my code correct for Java but just saved incorrectly?

Like I was just wondering if there was anyone that used Google Script so they could help me understand that it was incorrectly.

I understand the Difference between JavaScript and Java.

<!DOCTYPE html>
<html>
<head>
<script>
function displayDate()
{
document.getElementById("demo").innerHTML=Date();
}
</script>
</head>
<body>

<h1>My First JavaScript</h1>
<p id="demo">This is a paragraph.</p>

<button type="button" onclick="displayDate()">Display Date</button>

</body>
</html> 

That was JavaScript

public class HelloWorld {

        /**
         * @param args
         */
        public static void main(String[] args) {
        System.out.println("Hello World"); //prints Hello World
        System.out.printIn("Hello Again"); //prints Hello Again
        }

}

That is Java.

I do get the understatement on the diference.

I am just going to use a proper IDE (eclipse) unless there is a better one to use for .Java program files.

[toc] | [prev] | [next] | [standalone]


#2318

Frommarkspace <-@.>
Date2012-12-03 08:27 -0800
Message-ID<k9ijt0$l7q$1@dont-email.me>
In reply to#2317
On 12/3/2012 3:54 AM, John Dildy wrote:
> Is my code correct for Java but just saved incorrectly?
>
> Like I was just wondering if there was anyone that used Google Script
> so they could help me understand that it was incorrectly.

Yeah I just went through their tutorial.  I'm pretty sure you're 
trolling us, but I wrote the script for the tutorial just fine.  And 
it's JavaScript, not Java.  You clearly linked to the file with no need 
for semicolons, instead of the one from the tutorial that uses them.

>
> That was JavaScript

Wrong again.  It was HTML.

[toc] | [prev] | [next] | [standalone]


#2321

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-12-03 10:55 -0800
Message-ID<rbtpb89c6pq9eqioppbjm7ck5c40k2jr5q@4ax.com>
In reply to#2310
On Sun, 2 Dec 2012 14:27:15 -0800 (PST), John Dildy
<jdildy85@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>I have entered this code HelloWorld code:

see http://mindprod.com/jgloss/helloworld.html

That is Java, not googlescript, at least not yet.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish 
as couch potatoes who hire others to go to the gym for them. 

[toc] | [prev] | [next] | [standalone]


#2322

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-12-03 10:57 -0800
Message-ID<9ftpb8hjmh1t5bigc4m2b851t6l5m1ka9p@4ax.com>
In reply to#2310
On Sun, 2 Dec 2012 14:27:15 -0800 (PST), John Dildy
<jdildy85@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>And I got an error of I need a semicolon on line 5

When you post put >> on line 5.  It is not obvious to casual
observation which line that is.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish 
as couch potatoes who hire others to go to the gym for them. 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.help


csiph-web