Search Results

Search found 216 results on 9 pages for 'jdk1 6'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Difference in DocumentBuilder.parse when using JRE 1.5 and JDK 1.6

    - by dhiller
    Recently at last we have switched our projects to Java 1.6. When executing the tests I found out that using 1.6 a SAXParseException is not thrown which has been thrown using 1.5. Below is my test code to demonstrate the problem. import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.SchemaFactory; import org.junit.Test; import org.xml.sax.InputSource; import org.xml.sax.SAXParseException; /** * Test class to demonstrate the difference between JDK 1.5 to JDK 1.6. * * Seen on Linux: * * <pre> * #java version "1.6.0_18" * Java(TM) SE Runtime Environment (build 1.6.0_18-b07) * Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode) * </pre> * * Seen on OSX: * * <pre> * java version "1.6.0_17" * Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) * Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) * </pre> * * @author dhiller (creator) * @author $Author$ (last editor) * @version $Revision$ * @since 12.03.2010 11:32:31 */ public class TestXMLValidation { /** * Tests the schema validation of an XML against a simple schema. * * @throws Exception * Falls ein Fehler auftritt * @throws junit.framework.AssertionFailedError * Falls eine Unit-Test-Pruefung fehlschlaegt */ @Test(expected = SAXParseException.class) public void testValidate() throws Exception { final StreamSource schema = new StreamSource( new StringReader( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" " + "elementFormDefault=\"qualified\" xmlns:xsd=\"undefined\">" + "<xs:element name=\"Test\"/>" + "</xs:schema>" ) ); final String xml = "<Test42/>"; final DocumentBuilderFactory newFactory = DocumentBuilderFactory.newInstance(); newFactory.setSchema( SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" ).newSchema( schema ) ); final DocumentBuilder documentBuilder = newFactory.newDocumentBuilder(); documentBuilder.parse( new InputSource( new StringReader( xml ) ) ); } } When using a JVM 1.5 the test passes, on 1.6 it fails with "Expected exception SAXParseException". The Javadoc of the DocumentBuilderFactory.setSchema(Schema) Method says: When errors are found by the validator, the parser is responsible to report them to the user-specified ErrorHandler (or if the error handler is not set, ignore them or throw them), just like any other errors found by the parser itself. In other words, if the user-specified ErrorHandler is set, it must receive those errors, and if not, they must be treated according to the implementation specific default error handling rules. The Javadoc of the DocumentBuilder.parse(InputSource) method says: BTW: I tried setting an error handler via setErrorHandler, but there still is no exception. Now my question: What has changed to 1.6 that prevents the schema validation to throw a SAXParseException? Is it related to the schema or to the xml that I tried to parse?

    Read the article

  • Did we always have to register to download the Java 5 JDK, or is this new Oracle fun?

    - by Ukko
    I could swear that just a couple of months ago I downloaded a copy of the Java 1.5 SE JDK and I did not have to give them information on my first born. Today, I had to go through the register-and-we-will-send-you-a-link-someday dance. I have not received the link yet, so I thought I would ask about it here. What is special about the Java 5 JDK? I can get 6 just by clicking, is this a stick to get us to migrate to Java 6? Am I just not remembering doing this before? What marketing genius thought this would be a value add for Java? "If we make them sweat for the JDK they won't just delete it willy-nilly the next time?" Does everyone picture the people designing systems like this as mustache twirling Snidely Whiplash clones like I do? Did I just miss the link for the Secret Squirrel route to the download page? Finally, I am in the U.S. so I should not have to worry about export restrictions. Any thoughts?

    Read the article

  • JPanel superclass doesn't add the components of its subclasses..

    - by Acryl
    Well, I use a JFrame that adds two JPanels. Those JPanels are superclasses, because I find it easier to separate different areas of the GUI into different classes. But here's the problem: I add the (superclass) JPanel to the JFrame I set the layout of the superclass JPanel to new BorderLayout(); I add components in the subclasses, like this: JPanel panel = new JPanel(); panel.setLayout(new GridLayout(2,1)); panel.add(new JLabel("Label:"); panel.add(new JTextField(); add(panel, BorderLayout.NORTH); But it doesn't show. What do I do wrong? I've tried it without an additional JPanel in the subclasses, but it doesn't work either. I use jdk 1.6

    Read the article

  • Deprecate in Java 1.6

    - by iano
    In Java 1.5, to deprecate a method you would: @Deprecated int foo(int bar) { } Compiling this in Java 1.6 results in the following: Syntax error, annotations are only available if source level is 1.5 Any ideas?

    Read the article

  • How to properly set up Sun's JDK?

    - by jurchiks
    I'm trying to manually install the Sun JDK package (I have my reasons, don't bother asking why). I've successfully extracted the .bin file into /usr/lib/jvm/jdk1.6.0_23, but the problem is the PATH variable. I added this line to the /etc/environment file: JAVA_HOME="/usr/lib/jvm/jdk1.6.0_23" and added JAVA_HOME/bin to the PATH variable, BUT the OS still doesn't recognise the command java, says it's not installed and offers me gcj and openjdk. There was another way by using java-package and converting the .bin to .deb installer, but unfortunately that package is not available on/for maverick, so I can't do it that way. How can I make the PATH variable work and is there anything else required apart from the environment variables to make it all work? When I try to use the update-java-alternatives -l command, it says the following: awk: cannot open /usr/lib/jvm/*.jinfo (No such file or directory) jdk1.6.0_23 /usr/lib/jvm/jdk1.6.0_23 What should be the name of the file and the contents of it?

    Read the article

  • Wrong java -version being reported

    - by Malachi
    I am running Windows 7 Professional x64 and have the following Java versions installed: x64 C:\Program Files\Java jdk1.6.0_24 jdk1.7.0_04 jdk1.7.0_07 jre6 jre7 x86 C:\Program Files (x86)\Java jre1.6.0_07 jre6 jre7 in my environment variables I have my PATH containing C:\Program Files\Java\jdk1.6.0_24\bin and JAVA_HOME set to C:\Program Files\Java\jdk1.6.0_24\bin However running java -version reports java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) How is this the case when there is no reference to this version of Java in my Environment variables. Any help on this issue would be great as I am trying to run Apache ANT using Java 1.6.

    Read the article

  • problem with install su jdk-7u1 in ubuntu

    - by Fathima
    I finished some steps of installation of jdk-7u1 in Ubuntu 1.11 until below steps. after that step the terminal tells that there is nothing to configure. after that when I run a java file the terminal said that usr/lib/jvm/java : no such a file or directory. sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7

    Read the article

  • JDK 8 install in ubuntu

    - by maamaa
    I'm tring to install jdk 8 for weeks, but it fails.Following are some outputs, sudo update-alternatives --config java There is only one alternative in link group java (providing /usr/bin/java): /opt/java-oracle/jdk1.8.0/bin/java Nothing to configure. which java /usr/bin/java java bash: /usr/local/java/jdk1.7.0_51/bin/java: No such file or directory ls -l /usr/bin/java /usr/bin/java -> /etc/alternatives/java ls -l /etc/alternatives/java /etc/alternatives/java -> /opt/java-oracle/jdk1.8.0/bin/java sudo update-alternatives --config javac /opt/java-oracle/jdk1.8.0/bin/javac 1 manual mode javac Error: could not find libjava.so Error: Could not find Java SE Runtime Environment. If you can please give me a help to slove this problem. Thank You

    Read the article

  • what is difference between JDK 1.4 and JDK1.6.

    - by Vipin Nemade
    hi friend, I have created the project using the JDK 1.4. Now I want to use JDK 1.6 version in my project. for this what steps are required.Means I want to know the what changes is require in code to get a JDK 1.6 feature.Basically I am talking about the features that is added in JDK 1.6. If any one list out that changes it is very helpful. Thanks in advance..............................

    Read the article

  • m2eclipse: Eclipse is running in a JRE, but a JDK is required

    - by GernoK
    Hello, I have a problem with m2eclipse (0.10.0) together with eclipse galileo (Build id: 20090920-1017). I always get the error message:"Eclipse is running in a JRE, but a JDK is required". I have tried several things, but nothing works. The error message is still there. Here are the things I have tried: In WindowPreferencesJavaInstalled JREs I checked JDK1.6.0_20. DOES NOT WORK In WindowPreferencesJavaInstalled JREs I removed all JREs. Only the checked JDK1.6.0_20 is still there. DOES NOT WORK In WindowPreferencesJavaInstalled JREsExecution Environments I choosed JavaSE-1.6 and checked JDK1.6.0_20[perfect match]. DOES NOT WORK. In Preferences of the eclipse desktop start icon I added the -vm parameter (C:\Programme\eclipse_galileo\eclipse\eclipse.exe -vm C:\Programme\Java\jdk1.6.0_20\bin). DOES NOT WORK. I added the clean parameter (C:\Programme\eclipse_galileo\eclipse\eclipse.exe -vm C:\Programme\Java\jdk1.6.0_20\bin -clean). DOES NOT WORK. I added the -vm parameter to the eclipse.ini file with a carriage return after -vm and C:/Programme/Java/jdk1.6.0_20/bin/javaw.exe in a new line. DOES NOT WORK. After doing all these things I removed the m2eclipse plugin and installed it once again. DOES NOT WORK. New ideas I have tried: In Preferences of the eclipse desktop start icon I put the executable at the end (C:\Programme\eclipse_galileo\eclipse\eclipse.exe -vm C:\Programme\Java\jdk1.6.0_20\bin\javaw.exe). DOES NOT WORK. I changed in eclipse.ini the slashes to backslashes. DOES NOT WORK. Here is my eclipse.ini file: -startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -product org.eclipse.epp.package.jee.product --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vm C:\Programme\Java\jdk1.6.0_20\bin\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m Is anyone out there who have other ideas? Any help is appreciated. Thank You very much. GernoK

    Read the article

  • Error : 'java' is not recognized as an internal or external command, operable program or batch file.

    - by Setu
    I have my application online on the Google Apps Engine. When I deploy this application, this error is generated. I am using Netbeans 6.9. My jdk is installed at : "C:\Program Files\Java\jdk1.6.0_23\". I have installed Google App Engine for Java. This application is getting deployed & run on localhost very well. I am also able to start Google App Engine Server. I have set Environment variables as : 1) classpath : C:\Program Files\Java\jdk1.6.0_23\bin; 2) path : C:\Program Files\Java\jdk1.6.0_23\bin; 3) JAVA_HOME : C:\Program Files\Java\jdk1.6.0_23\bin; 4) include : C:\Program Files\Java\jdk1.6.0_23\include; 5) lib : C:\Program Files\Java\jdk1.6.0_23\lib; However, in system32, I am not finding java.exe, javac.exe or javawc.exe. Also, while running this : 1) java.exe 2) javac.exe 3) java -version from Command Line, they give proper output. How do I make my application properly deployed ?

    Read the article

  • Screwed up terminal after modifying bashrc

    - by omgzor
    I ended up screwing up my terminal, while setting up Sbt for the Coursera Scala course. I can't summon gedit (or anything else) anymore. I get the following error: Command 'gedit' is available in '/usr/bin/gedit' The command could not be located because '/usr/bin' is not included in the PATH environment variable. Also, each new instance of Terminal writes these messages before any command is written: -bash: :/home/antonio/jdk7/jdk1.7.0_07/bin: No such file or directory -bash: export: `/home/antonio/Desktop/Scala/install/sbt/bin:/home/antonio/jdk7/jdk1.7.0_07/bin': not a valid identifier I recently did a manual installation of the jdk 7, which apparently works: java -version java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode) While setting up Sbt, I made the mistake of editing bashrc by writing gedit ~/.bashrc on my terminal instead of writing gedit .bashrc, I wrote the following lines at the end of the bashrc file that opened: export PATH=/PATH/TO/YOUR/jdk1.7.0-VERSION/bin:$PATH export PATH=/home/antonio/jdk7/jdk1.7.0_07/bin:$PATH What is wrong here? How can I access my bashrc file and modify it again?

    Read the article

  • Failed to create symbolic link to keytool

    - by mt0s
    Keytool is /usr/bin/keytool and points to /etc/alternatives/keytool which in turn points to /usr/lib/jvm/java-6-openjdk-i386/jre/bin/keytool. Now I have installed java version 1.7.0_45 so I need to change keytool to the new path : /usr/lib/jvm/jdk1.7.0_45/jre/bin/keytool I tried deleting the /usr/bin/keytool with rm -rf and then adding a new link like : sudo ln -s /usr/bin/keytool /usr/lib/jvm/jdk1.7.0_45/jre/bin/keytool but what I get is ln: failed to create symbolic link `/usr/lib/jvm/jdk1.7.0_45/jre/bin/keytool': File exists I also tried : sudo update-alternatives --config keytool There is only one alternative in link group keytool: /usr/lib/jvm/java-6-openjdk-i386/jre/bin/keytool Nothing to configure. update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/java-6-openjdk-i386/jre/bin/keytool because link group keytool is broken. but doesn't works too. Any suggestions ? Thank you

    Read the article

  • "ERROR:Could not find java.nio.file.Paths" when using Oracle JDK 1.7

    - by Ankit
    I want to try out some features rolled out in Oracle's new JDK 1.7. I followed the post:- Oracle JDK 1.7 but the post doesn't seem to help. I was trying to fetch out the structure for java.nio.file.Paths class file but got the following error:- buffer@ankit:~$ javap java.nio.file.Paths ERROR:Could not find java.nio.file.Paths However i can easily get the information about class structures till JAVA SE 1.6, here is an example:- buffer@ankit:~$ javap java.lang.Object Compiled from "Object.java" public class java.lang.Object{ public java.lang.Object(); public final native java.lang.Class getClass(); public native int hashCode(); public boolean equals(java.lang.Object); protected native java.lang.Object clone() throws java.lang.CloneNotSupportedException; public java.lang.String toString(); public final native void notify(); public final native void notifyAll(); public final native void wait(long) throws java.lang.InterruptedException; public final void wait(long, int) throws java.lang.InterruptedException; public final void wait() throws java.lang.InterruptedException; protected void finalize() throws java.lang.Throwable; static {}; } Running java -version gives the following result:- buffer@ankit:~$ java -version java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) SYSTEM INFORMATION buffer@ankit:~$ sudo update-alternatives --config java [sudo] password for buffer: There are 4 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode 1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode 3 /usr/lib/jvm/jdk1.7.0_09/ 1 manual mode * 4 /usr/lib/jvm/jdk1.7.0_09/bin/java 1 manual mode buffer@ankit:~$ sudo update-alternatives --config javac There are 2 choices for the alternative javac (providing /usr/bin/javac). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061 auto mode 1 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061 manual mode * 2 /usr/lib/jvm/jdk1.7.0_09/bin/javac 1 manual mode buffer@ankit:~$ sudo update-alternatives --config javaws There are 3 choices for the alternative javaws (providing /usr/bin/javaws). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws 1061 auto mode 1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws 1061 manual mode 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws 1060 manual mode * 3 /usr/lib/jvm/jdk1.7.0_09/bin/javaws 1 manual mode The directory structure of /usr/lib/jvm/ is as follows:- buffer@ankit:~$ ls -l /usr/lib/jvm/ total 24 lrwxrwxrwx 1 root root 24 Dec 2 2011 default-java -> java-1.6.0-openjdk-amd64 drwxr-xr-x 4 root root 4096 Nov 8 16:24 java-1.5.0-gcj-4.6 lrwxrwxrwx 1 root root 24 Dec 2 2011 java-1.6.0-openjdk -> java-1.6.0-openjdk-amd64 lrwxrwxrwx 1 root root 20 Oct 25 00:01 java-1.6.0-openjdk-amd64 -> java-6-openjdk-amd64 lrwxrwxrwx 1 root root 20 Oct 25 06:59 java-1.7.0-openjdk-amd64 -> java-7-openjdk-amd64 lrwxrwxrwx 1 root root 24 Dec 2 2011 java-6-openjdk -> java-1.6.0-openjdk-amd64 drwxr-xr-x 7 root root 4096 Nov 8 16:24 java-6-openjdk-amd64 drwxr-xr-x 3 root root 4096 Nov 8 16:24 java-6-openjdk-common drwxr-xr-x 5 root root 4096 Nov 8 05:48 java-7-openjdk-amd64 drwxr-xr-x 3 root root 4096 Nov 8 05:48 java-7-openjdk-common drwxr-xr-x 8 buffer buffer 4096 Sep 25 09:08 jdk1.7.0_09 Any help would be highly appreciated.

    Read the article

  • 1.6 or 1.7: Browser side Java version for Oracle VM console

    - by katsumii
    I noticed one of the recent FAQ in OVM forum is about console.OTN Discussion Forums : Oracle VM Server for x86vnc console not running on Oracle VM 3.1.1 One of the variable for running console is Java version. I myself hit the bug below on Windows with JDK1.7 This is Windows only bug. I had success with JDK1.7 on Linux.Bug ID: 7191616 javaws.exe crashes when starting jnlp filejnlp file provided in the steps to reproduce always crashes javaws.exe in Java 7 Update 6.No problems in Update 4

    Read the article

  • Mixed java version installed

    - by david99world
    I've got the following in /.bashrc export JAVA_HOME=/usr/bin/jdk1.7.0_03/ export PATH=$PATH:/usr/bin/jdk1.7.0_03/bin This is fine, if I do $JAVA_HOME I get the directory above. The problem is if I do java -version I get... OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) How do I make the official jdk version the right one? Sorry I'm extremely new to Ubuntu. Thanks, David

    Read the article

  • Java process failure (hadoop, hbase)

    - by Vladimir
    Anytime I am running hadoop/hbase process from a command prompt I get an error: /usr/local/hadoop/bin/hadoop: line 320: /usr/lib/jvm/jdk1.7.0/bin/java: cannot execute binary file /usr/local/hadoop/bin/hadoop: line 390: /usr/lib/jvm/jdk1.7.0/bin/java: cannot execute binary file /usr/local/hadoop/bin/hadoop: line 390: /usr/lib/jvm/jdk1.7.0/bin/java: Success I get the same kind of error when I start hbase. java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode) Could you please tell me what could cause the issue? Thank you

    Read the article

  • How to setup tomcat 7 as a server on windows 2008 server

    - by birdy
    I setup the tomcat7 as a service as below: c:\Program Files (x86)\Tomcat7\apache-tomcat-7.0.32\bin>service.bat install Installing the service 'Tomcat7' ... Using CATALINA_HOME: "C:\Program Files (x86)\Tomcat7\apache-tomcat-7.0.32" Using CATALINA_BASE: "C:\Program Files (x86)\Tomcat7\apache-tomcat-7.0.32" Using JAVA_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_09" Using JRE_HOME: "C:\Program Files (x86)\Java\jdk1.7.0_09\jre" Using JVM: "C:\Program Files (x86)\Java\jdk1.7.0_09\jre\bin\server\ jvm.dll" However, when I try to start the service, I Get the error below: c:\Program Files (x86)\Tomcat7\apache-tomcat-7.0.32\bin>tomcat7.exe %1 is not a valid Win32 application. Failed to run service as console application This is the file I downloaded from apache: apache-tomcat-7.0.32-windows-x64.zip. I am able to successfully start tomcat on port 8080 as a standalong thing. Meaning I go to command prompt and type startup.bat and it starts up successfully. Question How can I resolve this and what are the things I should be troubleshooting for?

    Read the article

  • .jar why it works only with specigic jdk version???

    - by sadiq
    Hi friends, I have website source code...in which there is a adito.jar file first i extract it ...then make again jar using "jar -cvf adito.jar . and the changed jar file work fine again with that website. above process is only work when i use jdk1.6.0_14 only... BUT..... if i use jdk1.5 or letest jdk1.6.0_18 the same thing is not work..i mean that jar file will not run in my website... So what is the possible reason of this..as i am new kid in java... thanking you, sadiq.

    Read the article

  • Problem changing Java version using alternatives

    - by Brian Lewis
    I'm not quite sure how I got into this mess, but for some reason I'm not able to change the current version of Java using alternatives. I can run alternatives --config java and type my selection but when I echo the version number for either java or javac, it spits back out 1.5 every time (despite alternatives showing the current version is 1.6). The server I'm working with is running RHEL5, by the way. I have verified that the paths used in alternatives are pointing to the correct directories. Here's some output from my session: [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java + 2 /usr/java/jdk1.5.0_10/bin/java 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number: 3 [brilewis@myserver]$ java -version java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode) [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java 2 /usr/java/jdk1.5.0_10/bin/java + 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number:

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >