comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * PLEASE HELP - Strange problem in RSA class - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/379cab76e4a2210d * Problem with JAR manifest name? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/121b8821fa181283 * Runtime.getRuntime().exec() doesn't return (?) - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97faf78b55ba4d7f * Please really need help :NullPointerException with my applet - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/48f51870066479a2 * deep copy quesiton - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170 * Question regarding lycos VDS - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/12978f93dd03b5cd * profiling software recomendation - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/15be839996c5e520 * String.split() - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3362a3ab6d6ba8ba * XMLBeans compiler errors - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c6ef764704b1caa8 * replacement for JSObject in jdk1.5.0 ... - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/faa2a9fc564c848b * opinion on coding standard - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a * Got my Java console application finished - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/333146cf4a66cdb5 * Java-Query - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/802e1612aa3ef8f4 * servlet confussion - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/769a5b1cc047411c * Maximum size of MappedByteBuffer in Java 5.0 64 bit - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ee93ad14e4aa12c * cancel <[EMAIL PROTECTED]> - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ca5980c3b45a2b1 * Rules Engines - Best Practices? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a79bfcda56e2b81c ============================================================================== TOPIC: PLEASE HELP - Strange problem in RSA class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/379cab76e4a2210d ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 12:35 pm From: [EMAIL PROTECTED] (Gandu) Could some Java guru please provide some hints as to what the problem might be? I have a Java class to implement the RSA algorithm, as shown below: import java.math.BigInteger; import java.util.Random; import java.security.SecureRandom; import java.io.*; public class RSA{ private BigInteger product; private BigInteger primeProduct; private BigInteger p; private BigInteger q; private BigInteger privKey; private BigInteger pubKey; private void genTestKeys(){ System.out.println("Generating test keys ..."); SecureRandom secRan = new SecureRandom(); BigInteger t1 = BigInteger.probablePrime(64, secRan); BigInteger t2 = BigInteger.probablePrime(64, secRan); BigInteger testProd = t1.multiply(t2); BigInteger x = t1.subtract(BigInteger.ONE); BigInteger y = t2.subtract(BigInteger.ONE); BigInteger testProdNew = x.multiply(y); BigInteger testPubKey = BigInteger.probablePrime(64, secRan); while(testPubKey.gcd(testProdNew).intValue() != 1){ testPubKey = testPubKey.add(new BigInteger("2")); } BigInteger testPrivKey = testPubKey.modInverse(testProdNew); product = testProd; primeProduct = testProdNew; pubKey = testPubKey; privKey = testPrivKey; } private boolean testForPrime(BigInteger puk, BigInteger prk, BigInteger prod){ long puK = puk.longValue(); long prK = prk.longValue(); long prodd = prod.longValue(); if((puK*prK)%prodd == 1) return true; return false; } public RSA(){ product = null; primeProduct = null; p = null; q = null; privKey = null; pubKey = null; } public void genKeys(){ System.out.println("Starting key generation ..."); genTestKeys(); } BigInteger encrypt(BigInteger bigInt){ if(bigInt != null){ return bigInt.modPow(pubKey, product); } else { return null; } } BigInteger decrypt(BigInteger bigInt){ if(bigInt != null){ } else{ return null; } } public void showKeys(){ if(pubKey != null || privKey != null){ System.out.println("Public Key: "+pubKey+" Private Key: "+privKey); } else{ System.out.println("One or more keys are null ..."); } } public static void main(String [] args){ RSA rsa = new RSA(); rsa.genKeys(); rsa.showKeys(); String str = new String("This is another test "); byte [] byteArray = str.getBytes(); BigInteger testBigInt = new BigInteger(byteArray); // BigInteger testBigInt = new BigInteger("12345678901234567890"); BigInteger result = rsa.decrypt(rsa.encrypt(testBigInt)); if(result != null){ System.out.println("Encrypted: "+testBigInt); // String str1 = new String(result.toByteArray()); // System.out.println("Decrypted: "+str1); System.out.println("Decrypted: "+result); } } } With the current input in 'public static void main(String [] args)' the output is: $ java RSA Starting key generation ... Generating test keys ... Public Key: 10358682925504495457 Private Key: 85548903426018865087899176922878292449 Encrypted: 123362224183149454759410594198589705514929735562272 Decrypted: 55094910403196717837670178223901034918 CLEARLY, the encryption/decryption is NOT working!!! However, if I change the input to: 'is another Test', the output is: $ java RSA Starting key generation ... Generating test keys ... Public Key: 16246273829459943121 Private Key: 203057061846410322238656565899373741153 Encrypted: 140166710452564844135883580065323381792 Decrypted: 140166710452564844135883580065323381792 CLEARLY, the encryption/decryption is WORKING!!! Could someone point out what I may be doing wrong? Thanks in advance for your help. ============================================================================== TOPIC: Problem with JAR manifest name? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/121b8821fa181283 ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 9:51 pm From: "Ferenc Hechler" Even if WinZIP displays the filename as "Manfest.mf" it is stored as "MANIFEST.MF" (assuming the file in your filesystem was named that way). You can check this by simply extracting the zip. bye, feri ============================================================================== TOPIC: Runtime.getRuntime().exec() doesn't return (?) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97faf78b55ba4d7f ============================================================================== == 1 of 2 == Date: Wed, Dec 1 2004 10:13 pm From: Steve Horsley Timo Nentwig wrote: > John C. Bollinger wrote: > > >>I'd bet that the for loop is blocking in BufferedReader.readLine(), >>presumably because the external process never terminates. Things to try: > > > The command does terminate when launched in console... > That's not relevant. If it can't print its error output to a blocked (un-read) pipe then it won't exit. Just do what he says. > >>(1) proc.getOutputStrteam().close(); > > > When? After the process exits (see above). If you don't close the streams, you have a handle leak. Steve == 2 of 2 == Date: Wed, Dec 1 2004 2:27 pm From: "Fahd Shariff" This usually works for me: BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream())); // read output lines from command and add to results String str; while ((str = br.readLine()) != null) { System.out.println(str); } // wait for command to terminate try { proc.waitFor(); } catch (InterruptedException e) { System.err.println("process was interrupted"); } // check its exit value if (proc.exitValue() == 0) // close stream br.close(); You might also want to check the error stream: if(proc.getErrorStream().available()!=0) -- Fahd Shariff http://www.fahdshariff.cjb.net "Let the code do the talking... " ============================================================================== TOPIC: Please really need help :NullPointerException with my applet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/48f51870066479a2 ============================================================================== == 1 of 4 == Date: Wed, Dec 1 2004 10:40 pm From: "Emilie Dorchies via JavaKB.com" The following code is ought to init my applet displaying a solution to the CIgarette Smokers Concurrency Problem. But it returns a NullPointerException while trying to load the images. I've tried also with getDocumentBase : same error. It drives me insane. Anyone 's got a workaround? Every contribution will be helpful. Thank you in advance, Emilie public class CigarApplet extends Applet { public static final int NUM_SMOKER = 3; public static final int NUM_INGREDIENT = 1; public Lock lock_ = new Lock(); public Lock matches_ = new Lock(); public Lock paper_ = new Lock(); public Lock tobacco_ = new Lock(); Image[] imgs = new Image[5]; URL[] image; CigarCanvas display; Thread[] smoke = new Thread[NUM_SMOKER]; Thread agent = new Thread(); Scrollbar slider; Button restart; Button freeze; boolean isStandalone; //Initialize the applet public void init() { try { MediaTracker mt = new MediaTracker(this); image[0] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/agent.gif"); imgs[0] = getImage(image[0]); mt.addImage(imgs[0], 0); image[1] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/matches_waiting.gif"); imgs[1] = getImage(image[1]); mt.addImage(imgs[1], 1); image[2] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/paper_waiting.gif"); imgs[2] = getImage(image[2]); mt.addImage(imgs[2], 2); image[3] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/tobacco_waiting.gif"); imgs[3] = getImage(image[3]); mt.addImage(imgs[3], 3); image[4] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/matches_smoking.gif"); imgs[4] = getImage(image[4]); mt.addImage(imgs[4], 4); image[5] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/paper_smoking.gif"); imgs[5] = getImage(image[5]); mt.addImage(imgs[5], 5); image[6] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/tobacco_smoking.gif"); imgs[6] = getImage(image[6]); mt.addImage(imgs[6], 6); image[7] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/matches.gif"); imgs[7] = getImage(image[7]); mt.addImage(imgs[7], 7); image[8] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/paper.gif"); imgs[8] = getImage(image[8]); mt.addImage(imgs[8], 8); image[9] = new URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/tobacco.gif"); imgs[9] = getImage(image[9]); mt.addImage(imgs[9], 9); try { mt.waitForAll(); } catch (java.lang.NullPointerException e) { e.printStackTrace(); } display.initPlacing(); JPanel p1 = new JPanel(); setLayout(new BorderLayout()); p1.add(slider = new Scrollbar(Scrollbar.HORIZONTAL, 50, 5, 0, 100)); p1.add(restart = new Button("Restart")); p1.add(freeze = new Button("Freeze")); p1.setLayout(new BorderLayout()); display = new CigarCanvas(this); display.setSize(300, 320); p1.add("Center", display); } catch (Exception e) { e.printStackTrace(); } } -- Message posted via http://www.javakb.com == 2 of 4 == Date: Wed, Dec 1 2004 6:06 pm From: Eric Sosman Emilie Dorchies via JavaKB.com wrote: > The following code is ought to init my applet displaying a solution to the > CIgarette Smokers Concurrency Problem. > But it returns a NullPointerException while trying to load the images. I've > tried also with getDocumentBase : same error. > It drives me insane. Anyone 's got a workaround? Every contribution will be > helpful. > Thank you in advance, > > Emilie > > public class CigarApplet > extends Applet { > > public static final int NUM_SMOKER = 3; > public static final int NUM_INGREDIENT = 1; > > public Lock lock_ = new Lock(); > public Lock matches_ = new Lock(); > public Lock paper_ = new Lock(); > public Lock tobacco_ = new Lock(); > > Image[] imgs = new Image[5]; > URL[] image; This creates a reference called `image' that is able to point to an array of URL objects. No such array has been created yet, and `image' has the value `null'. > CigarCanvas display; > Thread[] smoke = new Thread[NUM_SMOKER]; > Thread agent = new Thread(); > Scrollbar slider; > Button restart; > Button freeze; > > boolean isStandalone; > > //Initialize the applet > public void init() { > > try { > > MediaTracker mt = new MediaTracker(this); > image[0] = new > URL("http://www.macs.hw.ac.uk/~ed21/MyApplet/images/agent.gif"); Since `image' is still `null', it does not point to an array of any kind. When you try to access the zeroth element of that non-existent array, you get a NullPointerException. > imgs[0] = getImage(image[0]); > mt.addImage(imgs[0], 0); > [...] > imgs[5] = getImage(image[5]); Once you solve the NullPointerException, your next problem will be the ArrayIndexOutOfBoundsException you get when you try to access the sixth element of this five-element array ... By the way, have you ever heard of something called a "loop?" The code you're using for all ten of these images differs only in the URL strings and in the array indices. Why not just make an array of the strings and then write a loop that repeats the same code ten times, once for each string? It's not only boring to write the exact same code ten times in a row, but you'll find that it's also error-prone. -- [EMAIL PROTECTED] == 3 of 4 == Date: Wed, Dec 1 2004 11:22 pm From: Andrew Thompson On Wed, 01 Dec 2004 22:40:54 GMT, Emilie Dorchies via JavaKB.com wrote: > The following code is ought to init my applet displaying a > solution to the CIgarette Smokers Concurrency Problem. Please put 'newlines' before 72 characters Emilie. Usually I recommend that folks set their news-client to do it for them, but I notice you are using a web-based interface to Usenet, so you will need to do it manually. > But it returns ... More commonly referred to as 'throws' >..a NullPointerException while trying to load the images. >..I've tried also with getDocumentBase : same error. > It drives me insane. Anyone 's got a workaround? Sensible code should do the trick, no 'workarounds' required. But before we get to a solution there are some (OK many) things that need to be cleared up. - You are posting to a group for advanced questions about Java, whereas it is apparent that you are just learning, so a better group to post to for the moment is <http://www.physci.org/codes/javafaq.jsp#cljh> On your web-based interface to usenet, it is referred to as 'First Aid'. - Don't mix swing and the AWT, they do not play well together. - Please post an SSCCE[1], rather than 102 lines of code that do not compile, due to.. - lack of import statements and a closing '}' - Missing two classes, 'Lock' and 'CigarCanvas' [1] <http://www.physci.org/codes/sscce.jsp> - When discussing applet problems in particular, always mention what OS and version, browser and version, Java maker and version. The last can be answered here. <http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor> - As mentioned in the SSCCE document, when dealing with applets, upload the applet (broken or whatever) and source (and images) to a free web-server like GeoCities so that people who are helping you can see it break for themselves. Link to the code from the applet page. - Read the FAQ referenced above, from start to finish. It mentions both applets (many times) and how to find resources. See you over on 'First Aid' with those things fixed up and we should be able to fix the problem pronto. HTH -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 4 of 4 == Date: Wed, Dec 1 2004 3:51 pm From: "Emilie Dorchies via JavaKB.com" Thank you for all these advices. See u on On the First Aid -- Message posted via http://www.javakb.com ============================================================================== TOPIC: deep copy quesiton http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170 ============================================================================== == 1 of 2 == Date: Thurs, Dec 2 2004 12:00 am From: Michiel Konstapel > Any thoughts on this or other good design patterns. The easy way to deep copy is to serialize to a byte array, then deserialize. Of course, your objects have to be Serializable for this to work. Michiel == 2 of 2 == Date: Wed, Dec 1 2004 6:25 pm From: [EMAIL PROTECTED] (Yamin) [EMAIL PROTECTED] (Yamin) wrote in message news:<[EMAIL PROTECTED]>... <snip> Thanks for the help all. I never thought of the serialization method. It seems like an interesting way to do it. Yamin ============================================================================== TOPIC: Question regarding lycos VDS http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/12978f93dd03b5cd ============================================================================== == 1 of 2 == Date: Wed, Dec 1 2004 3:11 pm From: [EMAIL PROTECTED] (Frank Gerlach) [EMAIL PROTECTED] (Markus Deibel) wrote in message news:<[EMAIL PROTECTED]>... > [EMAIL PROTECTED] (Frank Gerlach) wrote in message > > I am using a "virtual dedicated server" (VDS) from lycos. > > [...] > > This is the url: http://webcenter.lycos.de/ > > Hi Frank, > I'm thinking about getting one of these VDSs. > What about the disk space? Do you have to install the OS on this 1 GB > or is that separate? If I install sarge on that about 300-500 MB of my > space are gone. There are 1000Mbytes of net storage space. The Operating System is already installed, so you really have 1 GB for your applications. > > Perhaps you could share some of your experience. I had some problems, but the feedback from lycos (only on a bug tracking system, no telephone support) was quite good. You should know how to administer a linux system, otherwise you won't be happy... > > Cheers > Markus == 2 of 2 == Date: Wed, Dec 1 2004 3:12 pm From: [EMAIL PROTECTED] (Frank Gerlach) [EMAIL PROTECTED] (Markus Deibel) wrote in message news:<[EMAIL PROTECTED]>... > [EMAIL PROTECTED] (Frank Gerlach) wrote in message > > I am using a "virtual dedicated server" (VDS) from lycos. > > [...] > > This is the url: http://webcenter.lycos.de/ > > Hi Frank, > I'm thinking about getting one of these VDSs. > What about the disk space? Do you have to install the OS on this 1 GB > or is that separate? If I install sarge on that about 300-500 MB of my > space are gone. There are 1000Mbytes of net storage space. The Operating System is already installed, so you really have 1 GB for your applications. > > Perhaps you could share some of your experience. I had some problems, but the feedback from lycos (only on a bug tracking system, no telephone support) was quite good. You should know how to administer a linux system, otherwise you won't be happy... > > Cheers > Markus ============================================================================== TOPIC: profiling software recomendation http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/15be839996c5e520 ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 11:45 pm From: "Jeff" "JML" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I need to find memory leaks in my java application, I mean, I need to count > the live instances and the amount of used memory of the objects. > > I need a good profiling software. I used Haydes, Profile Eclipse Plugin, > but > I have some problems. I would like to probe other interesting software. > > I use Eclipse. > > Thanks in advance. > > > 1. I find Borland's OptimizeIt to be an excellent profiler of memory and cpu. I find it easy to identify memory leaks. It's about $800 2. Recently, I've tried Enerjy(enerjy.com) cpu and memory profiler. They plug into your IDE so you can profile while you code. They're nice tools and cheaper. 3. JRockit's JRA tool has good output and a more runtime environment orientation. For example, it clearly states heap usage, number of garbage collections, etc. But the profiling is not as strong. It's free at http://e-docs.bea.com/wljrockit 1 & 2 both offer free evals. Hope this helps, Jeff ============================================================================== TOPIC: String.split() http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3362a3ab6d6ba8ba ============================================================================== == 1 of 2 == Date: Thurs, Dec 2 2004 12:32 am From: "Ike" Can anyone please tell me why the following: String rxsl="1}{2}{3}{4}{5}{6}{7}{9}{10}{12}{13}{14}{15}{17"; String rsxla[] = rxsl.split("^.*\\}\\{.*$"); produces rxsla[0]="1}{2}{3}{4}{5}{6}{7}{9}{10}{12}{13}{14}{15}{17"; ??? and not rxsla[0]="1"; rxsla[1]="2"; ... rxsla[13]="17"; clearly I have something (simple and stupid) wrong -- but for the life of me, cannot find it here. Thanks, Ike == 2 of 2 == Date: Wed, Dec 1 2004 5:03 pm From: "Ike" The regex needs to be "\\}\\{" "Ike" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone please tell me why the following: > > > String rxsl="1}{2}{3}{4}{5}{6}{7}{9}{10}{12}{13}{14}{15}{17"; > String rsxla[] = rxsl.split("^.*\\}\\{.*$"); > > produces rxsla[0]="1}{2}{3}{4}{5}{6}{7}{9}{10}{12}{13}{14}{15}{17"; > > ??? > > and not > rxsla[0]="1"; > rxsla[1]="2"; > ... > rxsla[13]="17"; > > clearly I have something (simple and stupid) wrong -- but for the life of > me, cannot find it here. Thanks, Ike > > ============================================================================== TOPIC: XMLBeans compiler errors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c6ef764704b1caa8 ============================================================================== == 1 of 2 == Date: Wed, Dec 1 2004 5:17 pm From: "[EMAIL PROTECTED]" [crosspost to comp.lang.java.programmer,comp.lang.java.beans] Greetings All. I'm trying out XMLBeans 1.0.3 (in Windows environment). To test, I am using code from this article - Programming with XMLBeans (http://www-106.ibm.com/developerworks/xml/library/x-beans1/). However, I have trouble compiling the XSD file using the command: scomp -out automobile-policy.jar automobile-policy.xsd I get the following errors: Time to build schema type system: 1.892 seconds Time to generate code: 0.331 seconds 'javac' is required on the path. java.io.IOException: CreateProcess: D:\www\testbed\javac @C:\DOCUME~1\jay\LOCALS~1\Temp\javac15795 error=2 null java.io.IOException: CreateProcess: D:\www\testbed\javac @C:\DOCUME~1\jay\LOCALS~1\Temp\javac15795 error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.<init>(Unknown Source) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:218) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:815) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264) BUILD FAILED I have tried using '-verbose' and '-compiler' options as well but continue to get errors. Apache's XMLBeansv1 Wiki (http://wiki.apache.org/xmlbeans/XmlBeansV1Faq#scompFindingJavac) gives a solution to the first error - changing the location of %JAVA_HOME% in the path (move it higher up). This does not solve the problem as I still have to specify the compiler location. What gives? My updated command is: scomp -compiler C:\Java\j2sdk1.4.2_05\bin\javac -out automobile-policy.jar automobile-policy.xsd I now get the following errors: Time to build schema type system: 1.893 seconds Time to generate code: 0.34 seconds Time to compile code: 2.274 seconds java.io.IOException: CreateProcess: D:\www\testbed\jar cf D:\www\testbed\automobile-policy.jar -C C:\DOCUME~1\jay\LOCALS~1\Temp\xbean30916.d\classes . error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.<init>(Unknown Source) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalJar(CodeGenUtil.java:304) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:825) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264) BUILD FAILED I cannot figure out what the problem is here. I haven't found any solutions online either. Any ideas as to how I can remedy this situation? Thanks, Neetij == 2 of 2 == Date: Wed, Dec 1 2004 5:17 pm From: "[EMAIL PROTECTED]" [crosspost to comp.lang.java,comp.lang.java.programmer,comp.lang.java.beans] Greetings All. I'm trying out XMLBeans 1.0.3 (in Windows environment). To test, I am using code from this article - Programming with XMLBeans (http://www-106.ibm.com/developerworks/xml/library/x-beans1/). However, I have trouble compiling the XSD file using the command: scomp -out automobile-policy.jar automobile-policy.xsd I get the following errors: Time to build schema type system: 1.892 seconds Time to generate code: 0.331 seconds 'javac' is required on the path. java.io.IOException: CreateProcess: D:\www\testbed\javac @C:\DOCUME~1\jay\LOCALS~1\Temp\javac15795 error=2 null java.io.IOException: CreateProcess: D:\www\testbed\javac @C:\DOCUME~1\jay\LOCALS~1\Temp\javac15795 error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.<init>(Unknown Source) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:218) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:815) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264) BUILD FAILED I have tried using '-verbose' and '-compiler' options as well but continue to get errors. Apache's XMLBeansv1 Wiki (http://wiki.apache.org/xmlbeans/XmlBeansV1Faq#scompFindingJavac) gives a solution to the first error - changing the location of %JAVA_HOME% in the path (move it higher up). This does not solve the problem as I still have to specify the compiler location. What gives? My updated command is: scomp -compiler C:\Java\j2sdk1.4.2_05\bin\javac -out automobile-policy.jar automobile-policy.xsd I now get the following errors: Time to build schema type system: 1.893 seconds Time to generate code: 0.34 seconds Time to compile code: 2.274 seconds java.io.IOException: CreateProcess: D:\www\testbed\jar cf D:\www\testbed\automobile-policy.jar -C C:\DOCUME~1\jay\LOCALS~1\Temp\xbean30916.d\classes . error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.<init>(Unknown Source) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalJar(CodeGenUtil.java:304) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:825) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264) BUILD FAILED I cannot figure out what the problem is here. I haven't found any solutions online either. Any ideas as to how I can remedy this situation? Thanks, Neetij ============================================================================== TOPIC: replacement for JSObject in jdk1.5.0 ... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/faa2a9fc564c848b ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 5:31 pm From: Minh Tran-Le Hi, I have some old code that uses the netscape.javascript.JSObject to call javascript from a java applet. Is there a replacement for it in jdk1.5.x ? Thanks, Minh Tran-Le. ============================================================================== TOPIC: opinion on coding standard http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 5:54 pm From: "Ann" "Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ann wrote: > > In my experience in working at a large company, many decisions are made at > > the Vice President level (under her is an Executive Director, then a > > Department > > head, then my lowly Supervisor) and my sup is not able to bang the doors > > to make the VP change her mind even if she wanted to. > > What in god's grace is a *VP* doing micromanaging stuff like coding > standards? Haven't you heard? Using coding standards makes the stock price rise compared to not using coding standards. ============================================================================== TOPIC: Got my Java console application finished http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/333146cf4a66cdb5 ============================================================================== == 1 of 1 == Date: Thurs, Dec 2 2004 2:10 am From: [EMAIL PROTECTED] (Telicalbook) I finished my Java console application and it works great in Windows and Linux. The problem right now is testing it in Mac. I only have an old Mac Performa with OS8, and my Mac isn't reading it right. Anyone know how to use a Java console program in pre-OSX Macs? When I double click on the jar file it launches an editor now, does anyone know how to launch it as a console application? I have the Java Runtime Engine installed. I believe want to associate the jar files with the Java Runtime Engine in OS8...does anyone know how to do that with a Mac? -- Robert Pearson http://www.rspearson.com/ ParaMind Brainstorming Software http://www.paramind.net ============================================================================== TOPIC: Java-Query http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/802e1612aa3ef8f4 ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 10:00 pm From: "Hal Rosser" "Anil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Whats the particular use of method overloading It depends on the particular method, but mostly its to confuse Cobol programmers. Look at a few overloaded methods and you'll have answered your own question. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 11/19/2004 ============================================================================== TOPIC: servlet confussion http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/769a5b1cc047411c ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 7:03 pm From: "Hal Rosser" "e4_java" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i know what servlets are but i can't find any thing about in my > doumentation (J2SE 1.4.1-05). > > is the development and documentation seperate and if so where can i > find it? (a exact URL would be nice :) ) try this url http://java.sun.com/developer/onlineTraining/Servlets/Fundamentals/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 11/19/2004 ============================================================================== TOPIC: Maximum size of MappedByteBuffer in Java 5.0 64 bit http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ee93ad14e4aa12c ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 11:16 pm From: "The POWER of 2WO" I have developed a spatial database that accesses its tablespaces via MappedByteBuffers. As these tablespaces are growing, I'm near the 2Gig limit imposed by Java 1.4.2_06. I am investigating if I can alleviate this limit by using Java 5.0 with 64 bit Linux. My question is as follows: what is the largest ByteBuffer I can allocate in Java 5.0 64 bit Linux edition? I know that Linux 64 bit edition supports 512G virtual space per process. Can Java 5.0 utilize all 512G virtual space, and if so, how much for ByteBuffers ? If Java 5.0 can allocate only 2G ByteBuffers, can it allocate a pool of ByteBuffers, whose sum is 512G ? Thankyou Kevin M Canadian Demographic Mapping Service http://69.194.236.224:18080 Replies either to this group or to publicgis_d AT rogers DOT com ============================================================================== TOPIC: cancel <[EMAIL PROTECTED]> http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ca5980c3b45a2b1 ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 9:09 pm From: [EMAIL PROTECTED] This message was cancelled from within Mozilla. ============================================================================== TOPIC: Rules Engines - Best Practices? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a79bfcda56e2b81c ============================================================================== == 1 of 1 == Date: Wed, Dec 1 2004 10:07 pm From: Gregory Toomey Cindi Jenkins wrote: > Anyone know of best practices for rules engines. The only thing I > could find was at: > http://blogs.ittoolbox.com/eai/leadership/archives/002172.asp RESE and predicate logic in the link points to artificial intelligence. This is a HUGE subject area so I dont know why you cant find much. Do a search for deductive databases or expert systems. gtoomey ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
