Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

monkhouse's sample

 
Jaime Perez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Roel De Nijs
Sheriff
Posts: 10216
129
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carlos made a small mistake, the 2nd call should of course be
Kind regards,
Roel
 
Jaime Perez
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 221
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops! The rush of cut and paste!

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


Best,

Carlos.
 
Roel De Nijs
Sheriff
Posts: 10216
129
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaime,

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

Kind regards,
Roel
 
Mike Daly
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dammit,
sorry Carlos, i didn't cop that you had already answered
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic