| |
| |
| |
|
Page: 1 2 3
Comments:
<0> kley: read that tutorial, check the examples. <0> kley: you're giving us too little context to go on but its obvious that you're not properly creating the jarfile. <1> http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html i read it o did all ... <0> kley: it doesn't show. <1> hmm ... <1> can i execute i cl*** direct from jar like : java pclab3.bin.MyApp.cl*** <1> soon i get the same Exception in thread "main" java.lang.NoCl***DefFoundError: pclab3/bin/MyApp <0> theoreticly, but its ugly. The normal approach is "java -jar <jarfile>". <0> if you wish to utilize the jar you'd also need to setup the cl***path and such since java doesn't know it should look in the jar for the cl***es. <1> why ugly if it doesnt work <0> kley: it works, your problem is your inexperience with java. <0> first cl*** Java: you never run a .cl*** file but just name the cl*** itself. <1> like java -cl***path . pclab3.bin.MyApp <0> naturally "java filename.cl***" isn't going to work. <0> kley: no, where's the jarfile in that? java -cp .:./jarfile <cl*** to start>. Like I said; its a very ugly hack. <0> Basicly; you start a jarfile the same way you'd start the individual/unarchived cl***es.
<1> hmm and this .. E:\WORKSP~1\pclab3>java -cp .:./pclab3.jar MyApp <1> Exception in thread "main" java.lang.NoCl***DefFoundError: MyApp <1> E:\WORKSP~1\pclab3>java -cp .:./pclab3.jar bin.MyApp <1> Exception in thread "main" java.lang.NoCl***DefFoundError: bin/MyApp <1> E:\WORKSP~1\pclab3>java -cp .:./pclab3.jar pclab3.bin.MyApp <1> Exception in thread "main" java.lang.NoCl***DefFoundError: pclab3/bin/MyApp <0> kley: you're not paying much attention to what I'm tellign you. <1> i dont understand why my clas doesnt start <0> kley: because you're not specifying it correctly. <1> i understant it's not notmal to work .....directly in jar <0> kley: first get it to work outside the jar <1> i shoul use the manifest but i cant get it to work <1> outsite you mean E:\workspace\pclab3\bin>java MyApp <1> E:\workspace\pclab3\bin> <1> it works <1> then i'mtrying to make the jar <0> kley: then its just you not paying enough attention to what you're doing. From which directory are you creating the jarfile? <1> in E:\workspace\pclab3\ with E:\WORKSP~1\pclab3>jar -cvfm pclab3.jar pclab3.m * <0> kley: have you checked the jarfiles contents? <1> yes <1> it has 120 kb wanna look ? <0> kley: anyway. first things first; its obvious that you didn't try to get things to work outside the jar <1> what you mean how <0> kley: you tried to run the application from the bin directory, yet you're creating the jarfile from another directory. Thats not the same. <1> oh.. <0> kley: so... start to get the application to work from the pclab3 directory. <0> does the sourcefile actually specify that it is in a package called bin ? <1> strange : E:\workspace\pclab3>java bin\MyApp <1> Exception in thread "main" java.lang.NoCl***DefFoundError: bin\MyApp (wrong name <1> from that directory doesnt work <1> i cant get it to work from another directory whats wrong ? <0> <0> does the sourcefile actually specify that it is in a package called bin ? <1> ?? <1> its a folder not package <0> kley: well, that settles it then. You're just dumping files in directories without understanding what it does. <0> this is a good read: http://java.sun.com/docs/books/tutorial/java/index.html, especially: http://java.sun.com/docs/books/tutorial/java/package/index.html <0> for now; dump the directory structure and just create a jarfile from the bin directory while the manifest only specifies a main cl***. <1> so it not normal to put all project in a jar ? <0> kley: yes it is. <0> kley: I thought you said you read that earlier tutorial trail? Your question seems to indicate differently now. <1> yes <1> E:\workspace\pclab3>cd bin <1> E:\workspace\pclab3\bin>jar -cvfm pclab3.jar pclab3.m * <1> E:\workspace\pclab3\bin>java -jar pclab3.jar <1> Exception in thread "main" java.lang.NoCl***DefFoundError: pclab3/MyApp <1> ? :( <0> kley: you're not thinking. <0> kley: nor are you paying ANY attention to what I'm telling you. <1> ?? <0> kley: did you start your java program from the bin directory using pclab3/MyApp earlier on ? <0> kley: I don't think so. <1> but in jar there is no bin <0> <0> Basicly; you start a jarfile the same way you'd start the individual/unarchived cl***es. <0> <1> outsite you mean E:\workspace\pclab3\bin>java MyApp <0> <1> E:\workspace\pclab3\bin> <0> kley: so why do you now try to start pclab3/MyApp ? Dude; if you can't even solve this then better give up since its hopeless. <1> ? should my manithes look like Main-Cl***: pclab3.MyApp <0> kley: ofcourse not <1> ? should my manithes look like Main-Cl***: MyApp <1> aha <0> kley: THINK damnit. What does "pclab3" stand for?
<1> it works <0> kley: what does the pclab3 in "pclab3.MyApp" stand for ? <1> :) thanks <1> o fought pclab3 the package name and the cl*** MyApp <1> in tutorial is says packagename.cl***name <0> kley: thats a good guess. Now consider that a directory can symbolize a package and you might realize why this stuff doesn't work. Alas; tutorial will explain the details. <1> hmm but why it's not posible to start a cl*** to an far path like: java anyfolder/bin/cl***name <0> kley: due to 1) the cl***path. 2) the package. the cl*** would need to actually reside in a package called anyfolder.bin <1> hmm and to include cl***path how it would be <1> thanks a lot <2> hi <3> what's up? <2> hi <4> evening all <5> mb <4> hey rob :) <4> how goes it? <5> fine <5> you? <4> doing ok <5> good <6> isn't the syntax of a javadoc comment /** comment */ ? <5> for methods it is <6> and isn't @param x the way to specify parameter x? <5> http://java.sun.com/j2se/javadoc/ <5> any decent ide would add those javadoc comments automatically <6> well <6> I'm trying to use javadoc the way I believe it's specified <6> but it doesn't work <6> I don't generate any documentation <5> then you are doing something wrong <0> this is not a matter of belief, its just following the documentation as seen on the url Rob pasted. <2> Did you leave a blank line between the end of the comment and the method ? <5> chir <2> ? <0> actually you don't need a blank line. <2> I mean you should NOT leave one <0> why ? <0> there is nothing wrong with adding a blank line either. <6> hmm, well it doesn't work either way <0> tobbes: what is it you're doing? Any errors / messages? how are you starting the javadoc command? <2> I believed it didn't work with blank lines. But maybe I'm getting confused with DOXYGEN <6> hmm, copying the example works <6> thx <6> I'll just work from there. <7> anyone know of a simple date picker that will run on linux? <5> people use linux? <7> of course LOL <8> Um. <8> It's Java... <5> did you search on google for a data picker? <7> who would want to use WinBlows <8> Why would it not work on linux? <7> yup, looking now <5> we have our own date picker <8> Seems like a bit of a useless addition to the question <5> it works great <8> How about who knows of a simple date picker? <8> What does Linux have to do with the price of eggs? <7> Oh, I used someone else cl***, it throughs exceptions when I try to use it on Linux <0> well, ofcourse he could use the 'date' command but I guess thats too obvious. <8> That's not a date picker Lion-O <0> DaveLappy: it can be :) <7> :) <8> Roan so win bloze, but things don't run under linux. <0> Roan__: most likely you're not using java on linux but that <censored> piece of software called gcj and kaffe. Those aren't compatible with java. <7> Well it was designed under windows. <7> path structure and what not is different <5> why would a datepicker depend on file access <7> I am using netbeans on linux to develop programs. <5> people use netbeans? <0> well, I do :P on both windows and linux, and I fail to see the problem to be honost.
Return to
#java or Go to some related
logs:
#asm chpasswd + setuid: Operation not permitted #skype half-iranian girls #c++ phonetic and mboss apache worker freebsd php mysql #c #linuxhelp #windows
|
|