The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

installing / running a .jar file...

Posted by Steven YaegerII on October 22, 2000 at 4:59 PM

Can anyone offer some insight on how to install OOPad? I'm
using JDK1.2 on WIN 98. It was after a few unsuccessful tries at
changing my AUTOEXEC.BAT that I became nervous to change anything
else. This is the response I got from the OOPad site:

"The java executable will need a classpath variable set.
Some people set it in their autoexec.bat or .profile, but this
is a basic idea. You will invoke a java app in a shell so set the
classpath in the shell. Set it in cpath.bat or in oopad.bat , the
shell takes the last of multiple values if you set it more than
once."

First off, OOPad is on my machine at C:\JCode\oopad111, and
OOPad.java is in the oopad111 folder. My unchanged AutoExec and
OOPad files follow, with my suggested changes in []. Can you
tell me if you see anything wrong?


AUTOEXEC.BAT (my PC is set):
@SET CLASSPATH=.;C:\PROGRA~1\PHOTOD~1.1\ADOBEC~1;C:\jdk1.2.2\
lib\tools.jar

[set classpath=%CLASSPATH%;C:\JCode\oopad111\OOPad.jar]

oopad.bat (set on his PC):
set classpath=.;d:\java\jre\lib\rt.jar\;d:\work\packages
java ishtai.oopad.OOPad

[set classpath=%CLASSPATH%;C:\jdk1.2.2\lib\tools.jar;C:\
JCode\oopad111\OOPad.jar]

cpath.bat (set on his PC):
set classpath=.;d:\java\jre\lib\rt.jar;d:\work\packages

[set classpath=%CLASSPATH%;C:\jdk1.2.2\lib\tools.jar;C:\
JCode\oopad111\OOPad.jar]

oopad.mf (set on his PC):
Main-Class: ishitai.oopad.OOPad

[This doesn't make sense; OOPad.html is in oopad111\docs\
ishitai\oopad\OOPad.html]


Originally, I figured on changing just the AutoExec file.
Then, after the response from the OOPad site I seen his oopad.bat
andcpath.bat and figured they would have to be modified. And
finally, Sun's jar tutorial says a Main-Class statement is
needed, and I found oopad.mf, which refers to OOPad.html two
folders deep into \oopad111. Talk about humbling...CAN ANYONE
OFFER ANY INSIGHT AS TO WHAT I'M DOING WRONG, OR WHAT ELSE I
NEED TO DO????

Any help is greatly appreciated!



Replies:
  • How about this... Short version October 24, 2000 at 8:32 PM (2)
    • ClassPath Jegannathan.S December 16, 2000 at 10:49 AM (1)
      • ClassPath Jegannathan.S December 16, 2000 at 10:52 AM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us