• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

IntelliJ Error on Mac

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to coding and am learning Java. I wasn't much of a tech guy before all of this so the new path is giving me some trouble. I have installed IntelliJ, Java and its SDK on my Mac and am getting the follow error when attempting to run some practice script. Any help would be appreciated.

The error is shown in the picture attached.
Screen-Shot-2018-06-02-at-10.44.34-PM.png
[Thumbnail for Screen-Shot-2018-06-02-at-10.44.34-PM.png]
 
Ranch Hand
Posts: 118
1
IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You code won't compile because the return statement has error in it. Also if you want to execute code you need to have an entry point, which is main function declared as public static void main(String... arg).

Also, I am not sure why you got the error message. You need to set you 'Run/Debug configuration' settings in IntellijIDEA.

Instead of using a feature rich editor like IntellijIDEA, I think it's easier to start learning using just the command line a simple text editor. Here is a collection of Java tutorials from Oracle. They starts at the very basic: https://docs.oracle.com/javase/tutorial/?sess=16e492aba137894101940f7f88d9f51f
 
Marshal
Posts: 65432
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I am afraid that pictures can be difficult to read; I can barely see your error message. Please use copy'n'paste instead.
 
Aaron Macedonian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clicking on the picture will make it full screen.

I just changed my code in IntelliJ to the same code that is working on my Windows computer and am still getting the no such file or directory error. I fix what was mentioned above and commented out everything to see if just a System.out.println would work but it is the same error.
 
Your mother was a hamster and your father was a tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!