• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to create .java files on Mac?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,  I'm really excited about the excellent OCA Study Guide ( JAVA_OCA_Oracle_Certified_Associate_Java_SE_8_Programmer_I_Study_Guide_Exam_1Z0_808 )! However, I'm stuck. In Chapter 1 (Java Building Blocks) on p.14, in Compiling Code with Packages, it says: 'You’ll learn Java much more easily by using the command line to compile and test your examples. '

I totally agree! Then it says:
'Follow this example to make sure you know how to use the command line. If you have any problems following this procedure, post a question in the Beginning Java forum at CodeRanch (www.coderanch.com/forums/f-33/java)...'

On next page I saw:
Mac/Linux Setup Create the two files:
/tmp/packagea/ClassA.java
/tmp/packageb/ClassB.java

My problem is: How do I create .java files on Mac (with a specific path as above)? Which app can or should I use?

Sorry this is such a basic question (and I have no error message because I wasn't able to try anything). Thanks so much in advance for your help!

 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

This topic is age old, but I think it is still valid: https://coderanch.com/t/111632/os/Java-MAC-OS

And no, I wouldn't use /tmp, I'd use /Users/luke (assuming that "luke" were your user directory on the Mac).
 
R Luke
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again - your swift and most helpful reply made all the difference!  
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic