aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes monkhouse's sample Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "monkhouse Watch "monkhouse New topic
Author

monkhouse's sample

Jaime Perez
Greenhorn

Joined: Feb 08, 2010
Posts: 5
I've have a "netBook" with java 1.6 instaled and I already compiled (one by one) classes from the monkhouse's sample, but I don't know where to start the app execution, so I'm asking for help, because I want to watch the 3 ways (standalone and network) that supostly this example works.

I don't have any other tool to run the app, so I need to run it by command line .

Do you know the steps that I need to run the app standalone/network? (eg. I'm getting exception when apply "java ApplicationRunner")

tnx in advance
Jaime
Carlos Morillo
Ranch Hand

Joined: Jun 06, 2009
Posts: 221

If you got a copy of the book you would read in Chapter 9 all the details about it.

You would run it as from a Windows prompt terminal window and obviously you need C:\Programs\Java\bin in your path.




This will start the application in standalone mode, server mode or networked client mode respectively.

HTH,


Carlos.



SCSA, OCA, SCJP 5.0, SCJD, CCDH, CCAH http://www.linkedin.com/in/carlosamorillo
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5398
    
  13

Carlos made a small mistake, the 2nd call should of course be
Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Jaime Perez
Greenhorn

Joined: Feb 08, 2010
Posts: 5
Ok, I made the jar file, but I think something it's wrong because I tried to run the jar and appears the following message:
"Failed to load Main-Class manifest attribute from sampleproject.jar"

I opened the jar file and the manifest file doesn't have the line "Main-Class: sampleproject.gui.ApplicationRunner", but "Created-By: 1.6.0_18 (Sun Microsystems Inc.)"

I created the jar exactly like the book mentioned:


I tried replacing the manifest file into the jar file too, but still not working.
Carlos Morillo
Ranch Hand

Joined: Jun 06, 2009
Posts: 221

Oops! The rush of cut and paste!

Corrected!
Your eyes are always watching like an Eagle Roel!


Best,

Carlos.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5398
    
  13

Hi Jaime,

Have a look here, especially the part "An Application".

Kind regards,
Roel
Mike Daly
Greenhorn

Joined: Nov 05, 2009
Posts: 24
Jaime you have to run the jar from the commandline.

if you've already got as far as creating the jar in the SCJD directory then open a commandline in that directory and input

javaw -jar sampleproject.jar alone

or

javaw -jar sampleproject.jar server

or

javaw -jar sampleproject.jar

depending on what you want to run
Mike Daly
Greenhorn

Joined: Nov 05, 2009
Posts: 24
dammit,
sorry Carlos, i didn't cop that you had already answered
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: monkhouse's sample