Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] Starting a Java application
  • From: Stan Goodman <stan.goodman@xxxxxxxxxxxxx>
  • Date: Mon, 17 Mar 2008 21:23:59 +0200
  • Message-id: <200803172123.59921.stan.goodman@xxxxxxxxxxxxx>
On Monday 17 March 2008 20:27:12 Kai Ponte wrote:
On Monday 17 March 2008 11:04:21 am Stan Goodman wrote:
** Reply to message from Thomas Schmidt <tschmidt@xxxxxxx> on Mon, 17

The starting command that I have been trying to use (from a
terminal, in the application's own directory) is:

<java -cp ./lib/genj.jar:./lib/jhbasic.jar>

I don't know what the -cp does...

"-cp" is an alias for "-classpath". That's what I have found in Linux
documentation. But it's the same if I replace the two-letter command with
the whold word.

Under OS/2, I used quite a few Java applications. What I have seen is
that the NoClassFoundError is pretty much a general purpose thing
that can happen when virtually anything triggers it. I am hoping that
someone more knowledgeable than me can detect what is triggering it
now, because I just don't see it.


Basically, your command isn't launching anything.

That's why I posted the question. =;-)8

If your executable is in one of the jar files then you need to run the
-jar switch.

For example, here's how I run a project I'm working on..

kai@xwing:/> java -jar ./gerry.jar

I think that way is for apps newer than this one.

If you're trying to set a classpath in addition to the jar, I believe
that may or may not be supported.

java -cp someclassfile.jar:someotherclassfile.jar myCoolApplication

The app IS the first jar file, or the file within that file which is the
final argument in the command line I have been using. That is also the
way that this application is called in other OSes -- the differences
among them is entirely in the punctuation.

What version of Java do you have?


Stan Goodman
Qiryat Tiv'on
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >