Cant make an exeble jar of a package !
HI,
I have made an application declaring a package 'mypack'. My directory structure is :
e:
--mypack
----msbase.jar
----mssqlserver.jar
----msutil.jar
----Main.java
----*.java
----*.class
I set my classpath as :
SET CLASSPATH=".;E:\mypack\msbase.jar;E:\mypack\mssqlserver.jar;E:\mypack\msutil.jar;E:\;"
My package name is 'mypack'. I include the line 'package mypack' on top of every source files. I compiled all the source files successfully. And also succeeded to run the application by "java mypack.Main" from anywhere( my main class is Main.java ).
But i failed to build an executable jar file for this application.
My manifest file contains :
Manifest-Version: 1.0
Main-Class: Main
Created-By: 1.2 (Sun Microsystems Inc.)
And i did from the command prompt as follows:
e:\mypack>jar cvfm App.jar mymanifest.mf *
It builds the jar file but when i click it, it says "Could not find the main class. Program will exit !"
I also tried with "Main-Class: mypack.Main" in mymanifest.mf but it also didn work.
If I dont make the package 'mypack', then i get no error. App.jar can be executed. Then whats wrong with my package ?
I also tried with "Main-Class: mypack.Main" in mymanifest.mf
but it also didn work.That is the way it should work; the value for Main-Class should be the fully qualified class name which includes the name of the package.
Which error message do you get in this case, "could not find the main class?" If so, the jar file probably doesn't contain the class file in the right place: jar files have an internal directory structure and a class can't be found if it's in the wrong directory. The directory structure should be the same as the package structure of the source code.
This internal directory structure is defined by the command you use to create the jar file; if the command you posted works when you don't use the "package" declaration this should work now:
e:\>jar cvfm App.jar mymanifest.mf mypack/*
You can "peek" inside a jar file and check the directory structure with any file compression program (like winzip) or by using the "t" switch with the jar tool:
e:\>jar tf App.jar
Similar Messages
-
Revision: 5267
Author: [email protected]
Date: 2009-03-12 11:17:14 -0700 (Thu, 12 Mar 2009)
Log Message:
Update 3.x branch to include browserServer.jar in the packaged qa sdk zip.
Modified Paths:
blazeds/branches/3.x/qa/apps/qa-regress/build.xmlI've been playing with this too.
What kills it for me is my inability to get intelfb running properly on my eee 900 (says the module is loaded but there is no /dev/fb/0 device). One suggestion is to use a vga= code instead of video=intelfb:[etc] in my /boot/grub/menu.lst . But that makes it impossible to have the 1024x600 resolution of the eee's screen, so I haven't even tried it.
Why intelfb? Because mplayer's directfb driver has tearing even with buffermode=triple and mplayer's -double tag enabled when using uvesafb. Maybe I am assuming too much that the intelfb would have the hardware acceleration hooks necessary to make it work?
The other thing that cripples it for me is the "stuck at 16 colors" nature of Linux console even when running a framebuffer with a 32-bit background. I've gotten a tip on changing those colors but it is obtuse at best. Very surprised that there hasn't been a 256 color (at least) framebuffer console developed yet. (Unless screen magically enables the extra colors?) dfbterm looks interesting but the last thing I want is windowed terminals when I am trying to use CLI.
Last edited by jceasless (2009-06-03 18:54:51) -
I dont know what to do it wont take my security answers when i answer them correctly, and when i try to change them it askes me for them again and still wont take them, and the worst part is i cant make any purchases. Please help its been going on forever. Btw i just got a new laptop and i synced my iphone with it, and for the First Purchase i have to answer the secutiry questions. See my problem?
Congratulations on being the next victim of Apple's current SNAFU!
If you don't have a rescue email address set, then you're SoL.
If you do, then reset your info and check in there.
If not, you'll have to contact iTS, and wait for God knows how long for Apple to complete its pending investigation in this SNAFU.
iTunes Store Support
http://www.apple.com/emea/support/itunes/contact.html -
i forgot my icloud password and my email address for icould is no longer effective. i cant make any change to my iphone now, what should i do?
Contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.
-
I cant open my iphone 3g .... needs restore and itunes cant make restore has an error on phone .... how can I solve this problem?
Are there any error numbers given by iTunes? If yes, solutions for those numbers can be fund in this article: http://support.apple.com/kb/TS1275 or this one http://support.apple.com/kb/TS3694
-
Bbandtalk sip setup cant make outbound calls
hi i have extracted the sip settings for my bbandtalk service and loaded them into my 3cx server and it has registered fine. However, I cant make outbound calls. It comes up with a message saying 'sorry you cannot make or receive calls on this line'? any ideas? i have seen something about you cant use the bbandtalk sip setup unless you are on your bt broadband line....but if this was so, then how does the bbandtalk softphone client work?
Having similar problems ("Sorry, you cannot make or receive calls ..."). Using FreePBX and Asterisk and could use some help with the settings. Happy to take settings that go into other configuration files, but I'm currently stuck. Here's what I've got thus far (and it doesn't work -- tried several permutations, too):
type=peer
context=incoming_bbt
username=445603449781
authuser=445603449781
secret=B9R0WDKP9KAQMVX
host=62.239.169.148
insecure=very
fromuser=445603449781
fromdomain=62.239.169.148
dtmfmode=rfc2833
Any help would be appreciated. Have other VOIP services working and BT seems to register fine. -
Siri's voice just says everything that i touch. The voice says the numbers i touch but the numbers dont show up on the screen so i cant make phone calls! what is going on??
It sounds as if you have Voiceover activated. You should be able to turn it off by triple tapping the Home button.
-
HT201210 when I want to make a call show me the call back page and i cant make call
when I want to make a call show me the call back page and i cant make call
You helped me a lot, man!
I've been having the same problem for a long time ever since I changed to a new phone provider with a new sim which works with other phone except my iPhone 4. I just wouldn't make call but can send SMS and receive calls. Now, when I turned off 'call waiting' I could make phone calls. Thanks a million again!
P.S. When I turn on 'call waiting' again I could make call without problem any more. What a heck! -
Hi,
Would you please check my account joesong668. I cant make the payment through paypal. Each time I paid, skype will reject the payment and refund me. Please let me how to solve this problem.
Joe
Solved!
Go to Solution.Hi,
Please check it with Skype Customer Service.
Thank you.
See: https://support.skype.com/en/faq/FA1170
If my answer helped to fix your issue, mark it as a Solution to help others.
Thank You!
Please send private messages only upon request. -
Updating a JAR that uses packages
Hi There,
I have a problem in that I am trying to update a class within a JAR which uses packages. The issue is that when updating the JAR, the class I have requested to update is simply placed in the root of the JAR and not in the required package.
I need to to this within a Java program, so unpacking and re-packing the JAR is not an option.
Here is what i've been trying:
I have a class called UserProfile.class, which resides within my messages package - Structure: /messages/UserProfile.class
When I call the update command:
jar uf C:\AdminUI.jar E:\project\code\Eclipse_Proj\messages\UserProfile.class
It creates the folder structure /project/code/Eclipse_Proj/messages within the JAR file and places UserProfile.class within this folder - when in fact the UserProfile.class should be placed within the /messages folder.
Any ideas on how I can place the class in the correct folder would be much appreciated.
Thanks very much
K
nullThanks for the reply!
Yeah that works, but i'm trying to update the JAR from a Java program using
Runtime.getRuntime().exec()
but when I try to run the command Runtime.getRuntime().exec("cd c:") I get the below exception:
java.io.IOException: CreateProcess: cd c: error=2
I understand there is a -C parameter to temporarily change directory so I tried the following command:
jar uf C:\AdminUI.jar -C E:\project\code\Eclipse_Proj \messages\UserProfile.class
But this simply inserts the UserProfile.class into a jar under the following directory structure:
project/code/Eclipse_Proj/messages/UserProfile.class
Thanks again for your help.
Any input much appreciated
K -
i have just bought macbook air, cant make video calls on skype... why??
See this thread:
https://discussions.apple.com/thread/5306216?tstart=0
FIX:
1. You need Time Machine
2. Go to folder /Library/CoreMediaIO/Plug-Ins/DAL/
3. Copy AppleCamera.plugin to good place (usb memory stick is the best place).
4. Go to Time machine in date that skype work fine.
5. Change AppleCamera.plugin with file from Time Machine
6. Restart system, Now skype need to work with camera.
If that doesnt pass,
Suggest looking here, much success has been found:
http://community.skype.com/t5/Mac/OS-X-10-8-5-broke-Video-on-MacBook-Air/td-p/18 91729/page/4 -
I AM FACING PROBLEM AFTER UPDATING (7.0.4) MY PHONE MODEL 5C,AFTER THIS UPDATE SOME TIMES I CANT MAKE CALLS & SOME TIMES WHEN ANY BODY ELSE WANTS TO CALL ME BACK THE MESSAGE COME THAT THE USER IS NOT REACHABLE.PLS HELP
I am facing the same issue! I bought 5c few days back
and everything was fine till I updated the software 7.0.4!
Whenever am connected to wifi am unable to make a call and if someone tries
Calling me they get the message that my number is not
Reachable! When I go back to 3G the calls work perfectly!!
Please help me out since I use wifi more than my network.
Appreciate any advise on this -
Hallo. My time machine cant do the backup. It cant make the folder for the safety-backup. How do I solve this?
Have a look at Pondini's Time Machine information pages: http://pondini.org/TM/Troubleshooting.html
-
Why does my ipad say i cant make anymore apple ids or and i cloud account
Why does my ipad say i cant make anymore applie ids or an i cloud account abd how do i get an account HELP please !!!!!
Hello, I had the same problem (repeatedly) until I did this, it works!
Remove sim, very very lightly rub the sim card's contacts (the metallic parts) with a standard pencil eraser. I suspect its just a micro-residue from the manufacturing process interfering with complete contact. -
How can i make apple id i cant make i have i cloud but i cant have a apple i id help me to make apple id thank you??
Your Question is unclear...
Apple ID FAQs
http://support.apple.com/kb/HE37
iCloud FAQs
http://support.apple.com/kb/HT4436
Apple ID and iCloud
http://support.apple.com/kb/HT4895
Maybe you are looking for
-
If my hard drive disappears and is no longer running what are my options?
this is a last resort. Dropped the MBP. it wouldn't boot up. wouldn't boot in any mode, did the resets in order. safe mode failed to work as did all the disk util recommendation. It finally booted off the install DVD. Hard drive icon there. Did an ar
-
Adobe Photoshop CS6 Extended 64-Bit GPU Acceleration Stopped Working
I've been using Photoshop CS6 Extended 64-bit when one day the GPU acceleration features stopped working. I closed the application and restarted it and the GPU acceleration still didn't work. I couldn't rotate the canvas or use scrubby zoom. I reboot
-
Can I use my mac /picasa at classes for PC picasa are they much different, thanks
Hi I am going to class for Picasa, but on PC,s Is it much diferent ,can I take my laptop or use theirs. Thank you
-
Hideing the blocked vendor for F4 serch list
Hi , How we can hide the blocked vendors or materials for F4 search list ......... raghu
-
Need to Change Username and Password
I seriously need to find a way to change the router's login Username and Password. I live in an apartment building, and someone is logging into my router and disabling my wireless security every other week. So far, everywhere I've read has said that