Solved

what do I download?

Posted on 2002-04-15
15
376 Views
Last Modified: 2013-11-23
Hello,

I have absolutely no clue about java programmming, but I found a little program on the internet that I want to use.

The first step in the directions is:

1. Install the latest JDK

so, I do a search on it and I'm at-
http://java.sun.com/j2se/1.3/download.html

ok, so what do I download, the one under JRE right?

the other steps in the directions say to get Xalan XML Parser and Xerces XSLT Processor and put it in my CLASSPATH.

so, I'm over at www.apache.org going nuts, because it seems there are tons of versions of things and well I really don't know what to download there.
I'm taking a guess my CLASSPATH is wherever I end installing the JDK?

Finally, the last step is to unzip the news.jar to my CLASSPATH. I'm taking another guess that once I get the JDK installed, I'm suppose to somehow run the news.jar?
Anyway, any help on what download part much appreciated. =)

Hopefully this won't be too hard for me. ;)
I remember installing Perl on my computer a long time ago, don't remember that being to hard.

Computer specs: win95 266mhz pentium II mmx 128ram
0
Comment
Question by:sayhi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 3
  • +2
15 Comments
 
LVL 1

Expert Comment

by:naveeth
ID: 6943975
why don't u try a simple hello world program then go a head
0
 

Expert Comment

by:jodear
ID: 6944142
If you just want to do Java programming, why would you need the XML parser and the XSLT processor?  You'd only need these if you are going to do Java programming to make WEB APPLICATIONS.

If you want to learn Java programming to create PC applications/software, JDK is the only software you need (and as you said, you've already downloaded it).

By the way, what does the Java sample program that interested you to try out do?
0
 

Expert Comment

by:jodear
ID: 6944149
Oops, I just saw that you just downloaded the JRE.  What you needed to download is the SDK (software development kit).  JRE means java runtime environment, it only runs your java programs.  To compile your java programs, you need the SDK.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Expert Comment

by:jodear
ID: 6944177
Also the SDK you download would have lots of sample programs you can study.  Plus, if you want good tutorials, check

http://developer.java.sun.com/developer/onlineTraining/Some of them are even downloadable.
0
 
LVL 2

Expert Comment

by:DidierD
ID: 6944799
Hmmm I think he does not want to program in Java. He only wants to try an executable jar file.
Install the jre(the link you already have). Then install Xalan and xerces. You can find them at  http://xml.apache.org/xalan-j/index.html (binary distribution) and http://gump.covalent.net/jars/latest/xml-xerces2/  Put them on your harddisk and put their full paths in the CLASSPATH. To run the news.jar file just doubleclick it.
I'm not sure but i think this is all you have to do.
0
 
LVL 1

Expert Comment

by:iartmirko
ID: 6945121
Hi,

if you want to run the news.jar (it seems to use XML parser and XSl Stylesheet processor internally), the JRE is correct.

Download the Java XML Pack - Spring 02 Release from http://java.sun.com/xml/downloads/javaxmlpack.html

Unpack it. You will find a jaxp-XXX directory in the java-xml-pack-XXX dir. In this directory you will find the xerces.jar and xalan.jar you need.

copy both jars to the place your news.jar is. Get a shell and change to the directory the news.jar is.

Type the following command:

java -classpath xerces.jar;xalan.jar;. -jar news.jar
(if you are under Unix, replace ; with :)

That will hopefully solve your problem.
Have fun with Java :-)

Mirko
0
 
LVL 1

Author Comment

by:sayhi
ID: 6946227
yes, I think some of you didn't read carefully ;)

okay, iartmirko, I will download the JRE and follow your link and directions. we'll see what happens... :o)
0
 
LVL 1

Author Comment

by:sayhi
ID: 6946326
alrighty, here's what i've done:

i extracted xalan.jar out of the package and 2 files called xsltc.jar and xerceslmpl.jar into the same folder.
i wasn't sure which (xsltc or xerces) jars to use, so i tried both.

went to my MS-DOS prompt and typed:
java -classpath xerceslmpl.jar;xalan.jar; -jar news.jar

then it says
Failed to load Main-Class manifest attribute from news.jar

so tried:
java -classpath xsltc.jar;xalan.jar; -jar news.jar
and got same error message

so now I am stuck.
0
 
LVL 1

Author Comment

by:sayhi
ID: 6946334
Hmm, reading over the comments again, should I have download the SDK? what is the difference between running and compiling?
0
 
LVL 1

Author Comment

by:sayhi
ID: 6946360
Doubled the points. =)

Arg, this is getting more and more complicated I think hehe. Went to http://java.sun.com/docs/books/tutorial/jar/basics/mod.html to read about the manifest file. Looks pretty involved to me. Though, I won't give up on this just yet. ;)

my news.jar has 4 classes in it
0
 
LVL 1

Expert Comment

by:iartmirko
ID: 6948260
The first call was right (java -classpath xerceslmpl.jar;xalan.jar; -jar news.jar). It failed because news.jar is not a executable jar file. You can specify the Main class in the manifest file of a jar, if you want to make things easier for users...they haven't done this.

So do the falling call in the directory the .jars are:

java -classpath xerceslmpl.jar;xalan.jar;news.jar XXX

Where XXX is the name of the class in the news.jar (try every 4, because I don't know which one is the main class) Class names are case sensitiv and don't attach the .class. If a class in the jar would have the name NewsReader.class the call would be:

java -classpath xerceslmpl.jar;xalan.jar;news.jar NewsReader

Good luck ;)

Mirko

 


0
 
LVL 1

Author Comment

by:sayhi
ID: 6949155
Exception in thread "main" java.lang.NoClassDefFoundError: JNews
0
 
LVL 1

Accepted Solution

by:
iartmirko earned 101 total points
ID: 6951254
Ok, sorry. A Java class is defined by its name and its package. You can identify the package if you look at the directories the class is in. E.g. if JNews is in the directory com\news\JNews.class, then the commmand is

java -classpath xerceslmpl.jar;xalan.jar;news.jar com.news.JNews

Mirko
0
 
LVL 1

Author Comment

by:sayhi
ID: 6955022
heh

Exception in thread "main" java.lang.NoSuchMethodError: main

okay after this, I think i'll quit lol ;)
0
 
LVL 1

Author Comment

by:sayhi
ID: 6961141
nm, got it =)

thanks for all your help
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question