Jump to content

class file what am I doing wrong??

- - - - -

  • Please log in to reply
4 replies to this topic

#1
carface

carface

    Newbie

  • Members
  • Pip
  • 3 posts
I have downloaded some files for an app that are .class files and one folder that is a META-INF file.

The files are on the C drive so in the command prompt i have typed cd C:\ then pressed enter.
Then I have typed java -cp.BlablaServ

I get this error message

Unrecognised option : -cp.BlablaServ
Could not create the Java virtual machine

Can anyone help me with this as I cant see what I am doing wrong

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Maybe this helps: http://forum.codecal...e-jar-file.html

#3
carface

carface

    Newbie

  • Members
  • Pip
  • 3 posts
Ok I had a look at that topic and after following the instructions I get this error message 'jar' is not recognised as an internal or external command, operable program or batch file.

Any ideas?

#4
carface

carface

    Newbie

  • Members
  • Pip
  • 3 posts
I created a jar file in the end and had to make sure the JDK was in the correct path. I went to Start>Control Panel>System>Advanced>Environment Variables and selected Path and entered where the JDK was which was C:\java\jdk1.5.0_06\bin\ for me.

Otherwise to run the class file through the command prompt each time just enter
java -cp . BlablaServ
Make sure you enter the spaces

#5
mnirahd

mnirahd

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 330 posts
Hi,

You shouldn't really have to create JAR in your case if you already know which one is the main class file to run.

Munir




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users