Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar not ok when in different folder

 
Miran Cvenkel
Ranch Hand
Posts: 198
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.compile my app
2. dist folder, doble click jar --> all goes OK
3.Copy jar to some other folder -> run it --> JVM error - could not find main class forms.MyForm ?
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the MANIFEST.MF file inside the JAR file (use a ZIP tool to open the JAR). Check out what the Class-Path is. That's relative to the JAR file itself. I think you copied the JAR file but forgot to copy some of the JAR files it needs.
 
Miran Cvenkel
Ranch Hand
Posts: 198
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you were right, I kind of expected that clean & build wraps all into one jar.
Or at least in NetBeans I would expect a checkbox to do that ...

can you recomend a toll for wrapping all, main yar + all libraries into one jar.

I read somewhere that this can be done with proguard, but I have no luck with it.
 
Miran Cvenkel
Ranch Hand
Posts: 198
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This instructions for netbeans (packing all libraries into single jar) worked for me
webpage
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic