• Post Reply Bookmark Topic Watch Topic
  • New Topic

Model.xml all errors and can't run my jar file  RSS feed

 
Reham Abdelazime
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm having a problem running ANY .jar file it tells me missing or can not load Main class, i found my module_rec.XML file looking like that :





is that's relevant ? and if it's not how can I fix this run issue
i'm working on Intillij Idea
i tried deleting the jre and the jdk then downloaded and installed them again and didn't still didn't work
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it tells me missing or can not load Main class

Can you execute the java command in a command prompt window and copy and paste the contents here?
 
Reham Abdelazime
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


and that is my Manifest.mf

 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When executing a jar file with the java command, you need to tell the java command about the jar by using the -jar option:
java -jar TheJarname.jar

To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.
 
Reham Abdelazime
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd C:\Users\General\IdeaProjects\Rec\out\artifacts\Rec_jar

C:\Users\General\IdeaProjects\Rec\out\artifacts\Rec_jar> java -classpath ".;sqli
te-jdbc-3.20.0.jar" Rec
Error: Could not find or load main class Rec

C:\Users\General\IdeaProjects\Rec\out\artifacts\Rec_jar>
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

In future please avoid screenshots; Norm R has already given you instructions for copying.
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Error: Could not find or load main class Rec

Where is the Rec.class file located?  The java program can not find it.
Is it at the root level or within a folder?  Is the Rec class in a package?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!