java1.22 setup

Hi, I am interesting at java. However, I have problem to setup the problem since I am self study about java. Currently I had download the jdk1.22, kawa and Jdk 1.22 API into my computer.
After I read through the JDK1.22 API, I still no idea how to setup this thing to run my application. Therefor I jus wondering is there any Web address to guide me  through how to setup the run time enviement???? Cause I am thinking to make 2D and 3D window in my application, and I keep on getting "thread in main, java.lang.... not found" such message. Due to teh setup problem, my process is going nowhere. I really need a hand on this to get me to start up. Thanks
c4marAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jerchCommented:
set your classpath in the your autoexec.bat if you're using windows.

set classpath=.;

if you're using linux
(sh and bash shell),
CLASSPATH=.;
EXPORT CLASSPATH

(csh and tcsh shell)
setenv CLASSPATH=.;


0
conickCommented:
Start here:
http://java.sun.com/docs/books/tutorial/
You can even download it and store it locally.

You do NOT need to set classpath at all in JDK1.2. It just adds confusion for new-comers.

Make a HelloWorld.java file containing:

//HelloWorld.java
public class HelloWorld {
   public static void main(String args[])  {
         System.out.println("Hello World");
   }
}
//end of file

Compile it by:
javac HelloWorld.java

Run it by:
java HelloWorld

Things to notice:
1) <installdir>\bin needs to be in your path (i think you have that already
2) Java is case sensitive!!!! Make sure you have upper and lower case letters correct
3) The public class name has to be EXACTLY the same as the file name
4) Use the .java extension when compiling but DO NOT use the .class extension when running. (Dont ask why.. i have no clue)

The above should get you so that you can compile and run your first simple program.
If this doesnt work copy/paste the exact error you receive.
0
conickCommented:
Hold off on the Java3D API til you get confortable with 2D.
Java3D is an add-on.  It is not built in to the current JDK release.
0
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

jerchCommented:
jerch changed the proposed answer to a comment
0
c4marAuthor Commented:
Thanks, I just wanting does the packetage setup in the same way too??? I mean when I create my own package class. Do I need to setup some path for it too??
0
jerchCommented:
This is my answer to a previous post.

First, set the classpath where the package is stored.

for example if you have a program like

package mylibrary.server;

public class MyServer {
}

in the filename MyServer.java and this file is stored in c:\src\mylibrary\server

simply set your classpath in your autoexec.bat

set classpath=.;c:\src

and then in your other application that wants to use the MyServer class. Simply put this line:

import mylibrary.server.*;

or

import mylibrary.server.MyServer;

now you can use the class MyServer in your program.

Hope this helps.

Jerson
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
conickCommented:
Alternatively you can "install" your package.
make your package a jar file (or multiple packages in a jar file)
and place in your <installdir>\jre\lib\ext\ directory
JDK/JRE1.2+ will look to this directory before looking at the classpath env variable for all your compiling and running needs.
Then you can import like Jerson said above.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.