XXXX@XXXXX.COM skrev: Yes. Yes. You should be able run the class-file from: C:\java\build\prod With command: java thufir.bonjour.HelloWorldApp .ed www.edmundkirwan.com
[...] [...] Thanks! :) Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\>cd C:\java\build\prod C:\java\build\prod> java thufir.bonjour.HelloWorldApp Hello World! C:\java\build\prod> I was looking at roedy's page on this error, but, well... -Thufir
I also got the jar task working :) However, the jarfile and Main-Class attributes are hard coded, rather than using properties :( +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C:\java> C:\java> C:\java>ant Buildfile: build.xml clean: [delete] Deleting directory C:\java\build prepare: [mkdir] Created dir: C:\java\build\prod compile: [javac] Compiling 1 source file to C:\java\build\prod package: [jar] Building jar: C:\java\HelloWorldApp.jar BUILD SUCCESSFUL Total time: 27 seconds C:\java>dir Volume in drive C has no label. Volume Serial Number is FCD2-42DE Directory of C:\java 06/25/2006 05:52p <DIR> . 06/25/2006 05:52p <DIR> .. 06/25/2006 05:51p <DIR> build 06/19/2006 03:25p 677 build.groovy 06/25/2006 05:51p 1,310 build.xml 06/24/2006 11:07p 1,324 build.xml.HelloWorldApp 06/25/2006 05:52p 967 HelloWorldApp.jar 06/25/2006 05:41p <DIR> src 06/24/2006 10:05p <DIR> vendor 4 File(s) 4,278 bytes 5 Dir(s) 816,582,656 bytes free C:\java>java -jar HelloWorldApp.jar Hello World! C:\java>type build.xml <?xml version="1.0"?> <!-- Just a simple HelloWorld app --> <project name="Hello" default="package" basedir="."> <property name="build.dir" location="build"/> <property name="build.prod.dir" location="${build.dir}/prod"/> <property name="doc.dir" location="doc"/> <property name="index.dir" location="index"/> <property name="src.dir" location="src"/> <property name="test.dir" location="test"/> <property name="vendor.lib.dir" location="vendor/lib"/> <property name="pkg.dir" location="thufir.bonjour"/> <property name="mainClass" location="HelloWorldApp"/> <path id="project.classpath"> <pathelement location="${build.prod.dir}" /> </path> <target name="clean"> <delete dir="${build.dir}" /> </target> <target name="prepare" depends="clean"> <mkdir dir="${build.prod.dir}"/> </target> <target name="compile" depends="prepare"> <javac srcdir="${src.dir}" destdir="${build.prod.dir}"> <classpath refid="project.classpath" /> </javac> </target> <target name="package" depends ="compile"> <jar jarfile="HelloWorldApp.jar" basedir="${build.prod.dir}" > <manifest> <attribute name="Main-Class" value="thufir.bonjour.HelloWorldApp" /> </manifest> </jar> </target> </project> C:\java> C:\java> C:\java> C:\java> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Thufir
2.How to call global function having its name?
Hi! In an app which I'm trying to fix to work with FF there's a lot of code like eval("function_name();"). I remember that there's some way to call global functions using window object, but I can't get it to work. Here's what I tried (in Firebug console): function a() {alert("a called")}; a(); // works eval("a();"); // works window["a"](); // doesn't work TypeError: window.a is not a function window.b = function() {alert("b called");} window["b"](); // works So how can I call global functions in other way than using eval? Thanks in advance
3.mz js select nodes with xpath, having by specific attribute named 'class' the 'subvalue part' set
<style> .marek{} </style> etc.. <root> <element class="marek mand"/> <element class="mand marek blah"/> <element class="mand marekmd"/> <element class="mand marekk"/> </root> I would like to know what is the XPath expression for Mozillas JavaScript document.evaluate method first argument, if i want to get all the nodes, that have the 'css'-class named "marek" set. By above data only 2 elements should be returned, because they and they only have the 'css' class "marek" set. The XPath expression should not match 'marekk' nor 'marekmd'. I read few articles about xpath and i didnt saw any regular expressions to be used there, but what i saw was that the xpath string functions are definately too weak and clumsy to achieve my goal. I am new to XPath, smz o i thought some master regular could teach me a bit. TIA
4.package -- what am I doing wrong?
This is a multi-part message in MIME format. Java-ians of all levels, Managing and importing classes is supposed to be easy using PACKAGE. However, I cannot make it work. Here is a recent attempt: the file called packageThingie.java contains package myPackage; public class packageThingie { } the file called testMyPackage.java contains import myPackage.* public class testMyPackage { testMyPackage() //default constructor { } //closes constructor public static void main(String args[]) { testMyPackage myTMP = new testMyPackage(); } } When I compile, I keep getting a message saying the package myPackage doesn't exist. FYI, both .java files and their corresponding .class files are in the C:\j2sdk1.4.1\bin directory. HELP!! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> Java-ians of all levels,<br> Managing and importing classes is supposed to be easy using PACKAGE. However, I cannot make it work. Here is a recent attempt:<br> <br> the file called packageThingie.java contains<br> <br> package myPackage;<br> public class packageThingie<br> {<br> }<br> <br> the file called testMyPackage.java contains<br> import myPackage.* <br> <br> public class testMyPackage<br> {<br> testMyPackage() //default constructor<br> {<br> } //closes constructor<br> <br> public static void main(String args[])<br> {<br> testMyPackage myTMP = new testMyPackage();<br> }<br> }<br> <br> When I compile, I keep getting a message saying the package myPackage doesn't exist. FYI, both .java files and their corresponding .class files are in the C:\j2sdk1.4.1\bin directory.<br> <br> HELP!!<br> </body> </html>
5.xdoclet facade and wrong packages for interfaces
Hi, problem is when generating session facade for CMP bean, eg. if I have a package some.package.foo.cmp.MyEJB and my intention is to generate interfaces into some.package.foo.iface.MyEJBLocal some.package.foo.iface.MyEJBHome ... still when I generate session facade for CMP, result it refers to wrong interaface packages. some.package.foo.cmp.MyEJBLocal some.package.foo.cmp.MyEJBHome ... Generator cycle is 1. generating ifaces for CMP to make sure that facade generation, that follows finds correct iface packages. 2. generating facade for CMP 3. generationg iface for facade How to do the trick so that facade generator refers to right interface packages? --kari
6. Tomcat + JSP + GUI trouble: javax.servlet.ServletException: UserData (wrong name: UserData/UserData)
Users browsing this forum: No registered users and 61 guest