Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Calling all mac users!

  1. #1
    Member
    Join Date
    Jul 2013
    Location
    Mars
    Posts
    50
    My Mood
    Relaxed
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Calling all mac users!

    I am having a problem running a program though the terminal on my new mac, here's the stroy.

    I have been learning to code in java for a couple of months now, but up until recently i was using a PC and also using eclipse to compile and run all of my programs. In an effort to quit relying on an IDE to do my work for me, i figured ditching it for the time being may be helpful to me in the long run as I am a noob to computers as well as programming.

    I downloaded the current version of the JDK and made up a hello world code inside of TextEdit. Named the class HelloWorld and saved it as HelloWorld with the .java extension under my home directory but once i try to compile it inside of the terminal it throws a bunch of errors at me. Now, i know I'm new and all but i absolutely know how to write small programs so i don't think this is a syntax thing, just the format is foreign to me completely. If i can provide any additional information or take a screenshot to help you solve this with me please let me know.

    Thanks!


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Calling all mac users!

    Quote Originally Posted by ///M Dood View Post
    it throws a bunch of errors at me
    Always include the full text of the error messages with your question

  3. #3
    Member
    Join Date
    Jul 2013
    Location
    Mars
    Posts
    50
    My Mood
    Relaxed
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: Calling all mac users!


  4. #4
    Member
    Join Date
    Jul 2013
    Location
    Mars
    Posts
    50
    My Mood
    Relaxed
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: Calling all mac users!

    Hopefully that can be zoomed in a tad

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Calling all mac users!

    Copy and paste the errors into the forum, not an image of them.

  6. #6
    Member
    Join Date
    Jul 2013
    Location
    Mars
    Posts
    50
    My Mood
    Relaxed
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: Calling all mac users!

    HelloWorld.java:1: error: illegal character: \92
    {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf39 0
    ^
    HelloWorld.java:1: error: illegal character: \92
    {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf39 0
    ^
    HelloWorld.java:1: error: illegal character: \92
    {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf39 0
    ^
    HelloWorld.java:1: error: illegal character: \92
    {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf39 0
    ^
    HelloWorld.java:1: error: illegal character: \92
    {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf39 0
    ^
    HelloWorld.java:2: error: illegal character: \92
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    ^
    HelloWorld.java:2: error: illegal character: \92
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    ^
    HelloWorld.java:2: error: illegal character: \92
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    ^
    HelloWorld.java:2: error: illegal character: \92
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    ^
    HelloWorld.java:2: error: class, interface, or enum expected
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    ^
    HelloWorld.java:3: error: illegal character: \92
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:3: error: illegal character: \92
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:3: error: illegal character: \92
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:3: error: illegal character: \92
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:3: error: class, interface, or enum expected
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:3: error: class, interface, or enum expected
    {\colortbl;\red255\green255\blue255;}
    ^
    HelloWorld.java:4: error: illegal character: \92
    \margl1440\margr1440\vieww12840\viewh13200\viewkin d0
    ^
    HelloWorld.java:4: error: illegal character: \92
    \margl1440\margr1440\vieww12840\viewh13200\viewkin d0
    ^
    HelloWorld.java:4: error: illegal character: \92
    \margl1440\margr1440\vieww12840\viewh13200\viewkin d0
    ^
    HelloWorld.java:4: error: illegal character: \92
    \margl1440\margr1440\vieww12840\viewh13200\viewkin d0
    ^
    HelloWorld.java:4: error: illegal character: \92
    \margl1440\margr1440\vieww12840\viewh13200\viewkin d0
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:5: error: illegal character: \92
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5 040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatur al
    ^
    HelloWorld.java:7: error: illegal character: \92
    \f0\fs36 \cf0 public class HelloWorld \{\
    ^
    HelloWorld.java:7: error: illegal character: \92
    \f0\fs36 \cf0 public class HelloWorld \{\
    ^
    HelloWorld.java:7: error: illegal character: \92
    \f0\fs36 \cf0 public class HelloWorld \{\
    ^
    HelloWorld.java:7: error: illegal character: \92
    \f0\fs36 \cf0 public class HelloWorld \{\
    ^
    HelloWorld.java:7: error: illegal character: \92
    \f0\fs36 \cf0 public class HelloWorld \{\
    ^
    HelloWorld.java:8: error: illegal character: \92
    public static void main(String args[]) \{\
    ^
    HelloWorld.java:8: error: illegal character: \92
    public static void main(String args[]) \{\
    ^
    HelloWorld.java:9: error: illegal character: \92
    System.out.println("Hello World!");\
    ^
    HelloWorld.java:10: error: illegal character: \92
    \}\
    ^
    HelloWorld.java:10: error: ';' expected
    \}\
    ^
    HelloWorld.java:10: error: illegal character: \92
    \}\
    ^
    HelloWorld.java:11: error: illegal character: \92
    \}}
    ^
    48 errors

Similar Threads

  1. JDK and Textpad Downloads for Mac Users
    By jcamana10 in forum Java Theory & Questions
    Replies: 2
    Last Post: November 2nd, 2012, 12:50 PM
  2. Replies: 1
    Last Post: September 27th, 2012, 11:08 AM
  3. Hello Java users!
    By Sagittarian in forum Member Introductions
    Replies: 0
    Last Post: June 1st, 2012, 01:45 PM
  4. Generate users id
    By sante in forum Algorithms & Recursion
    Replies: 5
    Last Post: October 6th, 2011, 11:29 AM
  5. How to know number of user downloading an application?
    By jazz2k8 in forum Java Theory & Questions
    Replies: 2
    Last Post: July 3rd, 2008, 04:34 AM