Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help  RSS feed

 
Sarkis Kirkoriyan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can somebody help me with setup my machine, so i can write and execute java code. I�m an beginner and I have no programming experience, so please keep it simple. Please if you no some step by step plane to made my PC of laptop ready to reach my goal that will be better, or my be you no some url of website of an forum ware I can find some good basic info.

Thanks,
Sarkis
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Tutorial has all the information you need.
 
Sarkis Kirkoriyan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\Sun>javac MyFirstApp.java'
javac' is not recognized as an internal or external command, operable program or batch file
 
Sarkis Kirkoriyan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did what wrote there but with out result. I stile resave the flowing error:

C:\Sun>javac MyFirstApp.java'
javac' is not recognized as an internal or external command, operable program or batch file

my uservariable path is : C:\Sun\AppServer\bin
and systemvariable is : C:\Sun\AppServer\bin

what is rong here??
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit either your user or system Path variable to include the full path of where your bin directory of your JDK is installed. For example:
C:\Program Files\Java\JDK 1.5.0\bin\
Don't forget that entries on the path are seperated by a semi-colon.
 
Sarkis Kirkoriyan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fantastic, it works. but how can i setup the classpath? becose: Exception in thread "main" java.lang.NoClassDefFoundError.
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a general rule you shouldn't set the classpath, instead refer to the classpath when you run your code.For example:


You can also use the shortened -cp flag.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sarkis Kirkoriyan:
C:\Sun>javac MyFirstApp.java'
javac' is not recognized as an internal or external command, operable program or batch file


Originally posted by Sarkis Kirkoriyan:
fantastic, it works. but how can i setup the classpath? becose: Exception in thread "main" java.lang.NoClassDefFoundError.


The tutorial that Nigel pointed you to explains what these error mean and what you should do about them.

So: Please read the tutorial and follow it step by step.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!