• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

appeared in exam, but still not upload my assign. ............need help

 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
my jar is not working.
manifest.mf file
-----------------
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Main-class: suncertify.client.Client
creation of jar
----------------
jar -cvfm client.jar d:\scjd\starting\suncertify\manifest.mf d:\scjd\starting\suncertify\client\*.class d:\scjd\starting\suncertify\db\*.class
run jar
-------
java -jar client.jar
error
------
Exception in thread "main" java.lang.NoClassDefFoundError: suncertify/clien/Client
need help.
thanks and regards,
bhuvan.
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
I tried command suggested by you in other thread but still facing problem.
from d:\scjd\starting\suncertify;
creation of jar
---------------
jar -cvfm client.jar d:\scjd\starting\suncertify\manifest.mf suncertify\client\*.class suncertify\db\*.class
error
-----
suncertify\client\*.class: no such file or directory
suncertify\db\*.class: no such file or directory
need help.
thanks and regard,
bhuvan
[ April 19, 2002: Message edited by: Bhuvan mehra ]
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i created client.jar
from d:\scjd\starting location acc. to marks suggested command.
and able to start application.
with
java -jar client.jar
(running in local mode)
now facing new problem.
AccessDenied(java.io.FilePermission) while reading db.db file.
need suggestions.
thanks and regards,
bhuvan.
[ April 19, 2002: Message edited by: Bhuvan mehra ]
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in local mode
problem while reading db.db file.
how can i use policy file with client.jar file.
redards,
bhuvan
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
can you give me some suggestions, to handle the problem.
thanks,
bhuvan.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you seem to be moving one step at a time donw the fun road.
Do you get that access denied error when you run your app outside the jar file?
In any aspect of your local mode, do you have a SecurityManager? If you do, you will need a policy file, and start you client as such
java -Djava.security.policy=policy.all -jar client.jar
But I'd suggest removing the SecurityManager.
Mark
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
------------------------------------------
Do you get that access denied error when you run your app outside the jar file?
------------------------------------------
Without jar file, i always used
set classpth=d:\scjd\starting;
java suncertify.db.BindDataAccess (server side main file)
and never get any problem either in n/w or local mode.
problems start with the idea to run app. with jar file.
(which i am not able to use properly)

Same problem, AccessDenied while reading db.db file from server side also
after reading server side db.db
i register the server object. but never reach this point after using jar file to start the appl.
--1.-- app. works without jar with
java -djava.security.policy=mypolicy.java -classpath d:\scjd\suncertify suncertify.server.BindDataAccess
but restricion is user must have mypolicy.java file in the current directory.
otherwise user can run app. form any directory location with above command.
thanks,
bhuvan.
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark, any comments on --1.-- this approch.
can i submit with this approch?
any idea.
regards,
bhuvan.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In any aspect of your local mode, do you have a SecurityManager? If you do, you will need a policy file, and start you client as such
java -Djava.security.policy=policy.all -jar client.jar
But I'd suggest removing the SecurityManager.
Mark

Mark
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just curious...why do you have to create an executable jar while you can set the CLASSPATH to include the jar file and execute the application with out -jar option?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's really cool, is you can associate .jar files in Windows, so when you want to run the client in local mode, I only need to double click on the client.jar file in windows explorer and it runs.
Actually the reason why I like executable jars is that I try to keep the user from having to understand what classpath is. I know in the first year of Java programming classpath always got me really frustrated. Imagine a user who knows nothing about java.
I still get classpath issues, but when I see the errors at least I know right away where to look.
Mark
 
Bhuvan mehra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
facing one last problem.
i am trying to upload my assign. but getting message that i have no right to upload.
i have appeared in essay exam few hrs. back. perhaps that's the reason. i have written to sun and waiting response from last 3 hrs.

thanks all of you to share your experience and knowledge.
I don't know, what will be the result?
want to say one thing,
Mark, thanks for you help.
regards,
bhuvan.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nah, everyone gets that message. You need to send an e-mail to Monica at who2contact, and tell them you are uploading the assignment and get that message. They are pretty quick on that one to fix.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic