Author Topic: Troubles starting JPCt! HELP!  (Read 4383 times)

Offline 1234567890

  • byte
  • *
  • Posts: 3
  • The world is upside-down!
    • View Profile
Troubles starting JPCt! HELP!
« on: January 20, 2009, 01:50:25 pm »
I am somewhat new to java, but I want to try this, I have A problem though, when I try to open:
C:\Documents and Settings\Owner\My Documents\jtpc\jpctapi\jpct\lib\jpct\jpct.jar , it gives me a error message:
Failed to load main-class Manifest atributes from C:\Documents and Settings\Owner\My Documents\jtpc\jpctapi\jpct\lib\jpct\jpct.jar

so I need to fix that I guess.  Any Help, I am running windows and ubuntu and have tried it in both.

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: Troubles starting JPCt! HELP!
« Reply #1 on: January 20, 2009, 03:53:15 pm »
jpct jar is only a library.  It doesn't have a main class to get the program up and running.  If you go into the example files, there will be a file that says something like run.bat, can't remember for sure. The batch file combines jpct with the example code and gets it running.  It's really a small txt file that you can open with notepad and look at, but it's also an executable that you can double click on.  By the way, for me, I find netbeans IDE a big help for setting up a project and including libraries.  It may be different for other people, but all the classpath hocus pocus drives me nuts with java. 
« Last Edit: January 20, 2009, 04:09:23 pm by fireside »
click here->Fireside 7 Games<-

Offline 1234567890

  • byte
  • *
  • Posts: 3
  • The world is upside-down!
    • View Profile
Re: Troubles starting JPCt! HELP!
« Reply #2 on: January 20, 2009, 04:26:33 pm »
thank you for the reply. ;D ;D I found many example files, including a simple fps game, I am clueless as to how to make it start though, I found the run_java.bat file inside:
C:\Documents and Settings\Owner\My Documents\jtpc\jpctapi\jpct\examples\fps\run_java.bat
and the code was as follows:
Code: [Select]
java -Djava.library.path=..\..\lib\lwjgl-2.0\native\win32 -cp ..\..\lib\lwjgl-2.0\jar\lwjgl.jar;..\..\lib\lwjgl-2.0\jar\lwjgl_util.jar;..\..\lib\jpct\jpct.jar;fps.jar -Xmx128m JPCTDemo width=640 height=480 mipmap zbuffer=16 refresh=60
I tried making a run_java.bat in C:\Documents and Settings\Owner\My Documents\jtpc\jpctapi\jpct\lib\jpct to run JPCt with this code:

Quote
java -Djava.library.path=..\..\lib\lwjgl-2.0\native\win32 -cp ..\..\lib\lwjgl-2.0\jar\lwjgl.jar;..\..\lib\lwjgl-2.0\jar\lwjgl_util.jar;..\..\lib\jpct\jpct.jar;jpct.jar -Xmx128m JPCTDemo width=800 height=600 mipmap zbuffer=16 refresh=60

but then it closes.

Any help?  I am sure this is the total wrong approach. :P

tombom

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Troubles starting JPCt! HELP!
« Reply #3 on: January 20, 2009, 05:45:59 pm »
As fireside said, you can't run jPCT. There is nothing to run. It's just a library that can be used from within other applications...like the examples do it (do the examples work for you?).
Trying to run jPCT is like trying to drive with only a car engine and a toolbox...

Offline 1234567890

  • byte
  • *
  • Posts: 3
  • The world is upside-down!
    • View Profile
Re: Troubles starting JPCt! HELP!
« Reply #4 on: January 21, 2009, 03:46:56 am »
Ahh, ok, I thought it was a program. (like an exe jar thing) ok, I've got it, I still like it a lot, infact it might be even better (though harder) for what I am trying to do.