Using different JDK's...

Hi,
I compiled several classes with JDK 1.5. When trying to start them under JVM 1.4 I get the following error message:
class file has wrong version 49.0, should be 48.0
I'm compiling my classes by a custom ant script:
<target name="compile" description="compile">
        <mkdir dir="web/WEB-INF/classes"/>
        <javac destdir="web/WEB-INF/classes" srcdir="src" compiler="javac1.4">
        </javac>
</target>In my opinion the compiler attribute I used (javac1.4) tells the java compiler to generate 1.4 bytecode. But this doesn't work for me (see error message above).
Or does this mean that every class I compile with JDK 1.5 gets version 49.0 and every class I compile with JDK 1.4 gets version 48.0 (no matter what bytecode I'd like the compiler to generate)?
Any help would be greatly appreciated
- Stephan

Thanks a lot - that is the solution.
Best regards
- Stephan

Similar Messages

  • How to use different jdk on windows/unix/linux OS?

    Hi,
    I always use differen jdk/jre version. but always I delete first then I install jdk/jre which version I want. My question is how I change system jdk/jre setting don't uninstall jdk?

    If you have multiple monitors and run Linux, you may want to display different images as your wallpaper on each monitor. There's a utility for that – Nitrogen. The blackMORE Ops blog has a nice how-to on getting Nitrogen and configuring it, with step-by-step instructions and plenty of screenshots.
    This topic first appeared in the Spiceworks Community

  • How to work with different JDKs on SJSAS PE/EE 8.x domains/server instances

    Using this workaround it will be possible to use different versions of java (jdk) for different domains and server instances on a single 8.x PE and/or EE installation. Please make sure that the updated jdk is compatible with application server and the application(s) for which it is being updated. Tested on Solaris as of now.
    01 Create a copy of the existing asenv.conf and update the AS_JAVA property to point to the new jdk.
    cd <sjsas-install-directory>
    create a directory called 'new-config'
    copy config/asenv.conf to new-config/asenv.conf
    cd new-config
    edit asenv.conf and update AS_JAVA property with the desired jdk location
    02 Modify the domain/instance specific startserv and stopserv scripts so that they point to new asenv.conf.
    Modify the startserv and stopserv scripts in <domain-dir>/bin for domains and <instance-dir>/bin for instances for which the jdk needs to be modified.
    for ex. to change the startserv and stopserv scripts for a server instance under node agent.
    cd <sjsas-install-directory>/nodeagents/<node-agent>/<server-instance>/bin
    edit startserv and change the asenv.conf location.
    ASENV_CONF_LOCATION=<sjsas-install-directory>/new-config
    edit stopserv and change the asenv.conf location.
    ASENV_CONF_LOCATION=<sjsas-install-directory>/new-config
    03 Restart the domain/instance to use the updated jdk.
    Thanks to Prabhu Velayutham for sharing this work around.
    [email protected]

    Tested and found that the above workaround is valid for windows-xp as well.
    On windows the corresponding files are named asenv.bat, startserv.bat and stopserv.bat.
    [email protected]

  • Use the JDK without installing

    I don't have administrator privileges on my Windows XP. I already have JRE 1.4.2_03 installed, and I would like to be able to compile as well. However, I can't find anywhere a place to download the contents of the JDK without them being packaged into an installer. Would it work to just put javac.exe into the JRE's bin? Where could I find javac?

    Just to answer my own question after finally being able to experiment: yes, you can use the JDK without installing it. I was going to try copying in javac (and other files) into the JRE bin folder, but realized it's a different version. So anything I compiled I wouldn't be able to run.
    Instead, I installed the JDK onto another computer and then copied the JDK1.6.0_01 folder to my thumbdrive. Then I wrote a command-script that sets the path variable and opens the command-prompt for me to use the compiler. Now it works: Portable JDK 1.6.0_01. I just had to make sure to put the JDK's JRE bin first on the path list or I would use the wrong version JRE every time.

  • Ant Process, different JDK

    I have been looking at Sun Java Studio Enterprise 8 and came across with an issue while trying to port the project I am working on to the IDE. Basically, I have an application that is build uisng JDK 1.4.2 and Ant 1.6.2. However, 8 comes with JDK 1.5. You can change the Java Platform from the project property settings but when you run a target inside the IDE it uses the JDK that is has been booted from. I updated /etc/jstudio.conf to use JDK 1.4.2. At the end, I managed to compile the project within jstudio. However, I have to point out that the IDE tried to turn on some modules that most probably are supported with Java 5. It could look at the manifest file during loading to look at compatibility, couldn't it? Or is there another way of enforcing ant to use another JDK.

    You cannot run Ant itself with a different JDK than the one you specified for starting IDE. However you can always tell the Ant script to use a different JDK to compile, run, etc. You just need to have source attribute specified. A snippet of compile target would look like
    <target name="compile">
              <mkdir dir="_compile_core"/>
              <javac
                   srcdir="src"
                   destdir="_compile_core"
                   deprecation="${build.compiler.deprecation}"
                   debug="${build.compiler.debug}"
                   source="1.4">
    I have a project that uses JDK 1.4 and it compiles and runs in JSE8 (with default JDK1.5) without any issues.
    Hope it helps.

  • How do I use different Layouts?

    I am trying to make a program that runs in a window like this:
    http://www.exyt-web.com/Window.gif
    The problem I'm having is with the layout.
    How do I have more than one layout ?
    For example - as you can see in the image (hyperlink above) I wish to have a border layout with a JFrame at the North position and then in the South position I want to have buttons laid out in a FlowLayout.
    Also with my radio buttons I want these in a GridLayout(3, 0) layout.
    I made up some example code to test using different layouts - but it seems one layout always overrides the other...
    import java.awt.*;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    public class LayoutTest extends JFrame
        public LayoutTest()
            setTitle("Hello World");
            Container contents = getContentPane();
            Container contents2 = getContentPane();
            contents.setLayout(new FlowLayout());
            contents.add(new JLabel("<FILTER [Type a th|    ]>"));
            contents.add(contents2);
            contents.add(new JLabel("< Filter Button >"));
            contents.add(new JLabel("<  Add Button   >"));
            contents2.setLayout(new GridLayout());
            contents2.add(new JLabel("< Button 1 >"));
            contents2.add(new JLabel("< Button 2 >"));
            contents2.add(new JLabel("< Button 3 >"));
            contents2.add(new JLabel("< Button 4 >"));
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            pack();
        } // HelloWorld
        public static void main(String [] args)
            LayoutTest theLayoutTest = new LayoutTest();
            theLayoutTest.show();
        } // main
    } // class HelloWorldI know this obviously doesn't work but I hoped it would show what I was trying to do.
    I also tried creating a new 'contents2' and then adding it into 'contents'
    e.g. contents.add(contents2); My current code for the window I'm trying to create so far is:
    import java.awt.*;
    import javax.swing.*;
    public class Menus extends JFrame
        public static void Menus()
            // Creates a new JFrame, with the title specified in quotation marks.
            JFrame frame = new JFrame("Film Database");
            // Sets the default close operation of the frame.
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Creates a new menu bar for the frame.
            JMenuBar menuBar = new JMenuBar();
            // Creates a new menu for the menu bar.
            JMenu menu = new JMenu("File");
            addFrameContents(frame, menuBar, menu);
            // Sets the new menu bar on the frame
            frame.setJMenuBar(menuBar);
            frame.pack();
            frame.setVisible(true);
        } // HelloWorld
        public static void addFrameContents(JFrame frame, JMenuBar menuBar, JMenu menu)
            // Adds the menu to the menu bar.
            menuBar.add(menu);
            // Creates a new item for the menu with a small icon.
            JMenuItem menuLoad = new JMenuItem("Load", new ImageIcon("C:/load.gif"));
            // Adds the new item to the menu.
            menu.add(menuLoad);
            JMenuItem menuSave = new JMenuItem("Save", new ImageIcon("C:/save.gif"));
            menu.add(menuSave);
            JMenuItem menuQuit = new JMenuItem("Quit", new ImageIcon("C:/quit.gif"));
            menu.add(menuQuit);
            // Creates a new container.
            Container contents = frame.getContentPane();
            // Sets a new layout for contents, in this case FlowLayout.
            contents.setLayout(new GridLayout(2, 0));
            // Adds new JLabels to the container.
            contents.add(new JLabel("< JLabel 1 >"));
            contents.add(new JLabel("< JLabel 2 >"));
            contents.add(new JLabel("< JLabel 3 >"));
            contents.add(new JLabel("< JLabel 4 >"));
            JLabel thisLabel = new JLabel("Hello");
            thisLabel.setLayout(new FlowLayout());
            JLabel thisLabel2 = new JLabel("Hello2");
            thisLabel2.setLayout(new FlowLayout());
            contents.add(thisLabel);
            contents.add(thisLabel2);
        public static void main(String [] args)
            Menus();
        } // main
    } // class HelloWorldAny help on how I can use two separate layouts in the same frame would be great!
    Regards,
    Tom

    doing this:
    Container contents = getContentPane();
    Container contents2 = getContentPane();
    does not create 2 different containers. It's just creating 2 variables that refer to the same container. There is only 1 content pane in a window/frame. A container can only have 1 layout.
    If you want to have 2 layouts, you create 2 panels with separate layouts and put what you want in each panel, and put both panels in the content page.

  • How can I use different calendars associated with different emails to see appointmen​ts separately​?

    I have 3 emails accounts on my Blackberry curve. I want to use different calendars for different type of reminders/appointments. How can I do that? In calendar I pressed menu key and then clicked on select calendar, choose one email address (email 1) then entered an alarm but now if I go to a different calendar associated with different email ( email 2), it also shows me that alarm which I entered in email 1 calendar. Thanks for help

    Don't have LV handy to open the old code, but I did read through the thread you referenced.  It sounds like the example configured 2 counters to create the variable-freq finite pulse train and configured a 3rd counter to count the # steps generated as verification.   That 3rd counter would be a problem for you as there is no internal timing signal connection between your 2 USB devices.  You would need to run a physical wire connection and change some of the config code to match.  Alternately, you could just delete all the code associated with the 3rd counter for now because it isn't strictly necessary.
    Further advice/questions:  Are you planning on a pure sine wave of frequency such that you oscillate with both positive and negative velocity (example: varying from -1000 to +1000 Hz clockwise)?  Or is there a nominal average frequency with a small sine wave superimposed (example: nominal of 1000 Hz clockwise, variation of +/- 50 Hz)?
    I *think* you may be dealing with more of a continuous pulsetrain situation, which is actually much simpler.  You would only need 1 counter/timer, though you would still perform the freq changes in a timed loop which uses the pulsetrain as its timing source.  You'd just need to keep track of your total elapsed time so you could figure out the right sinusoidal freq value at the moment you're ready to update it.
    Another subtlety to watch out for if you're oscillating about 0 velocity  -- don't try to create a frequency that is lower than the rate at which you need to update.  Also, with steppers you may have mechanical stability issues at low freqs like 10's to low 100's of Hz.    These kinds of things may need to be managed as special cases which force you to deviate from a "pure" sine wave.
    -Kevin P.

  • I have just updated my Ipod to the latest ios.(deleting everything) and using different sources to get my music back it seems that every time i select multiple/individual songs on itunes i can change artwork but will not show up on my ipod?

    I have a windows 8 computer and have recently updated my ipod to the latest ios and it has wiped my Ipod clean except for my photos. whilst trying to get my music back using different sources like CD's and stuff i cant seem to get any album art to load on my Ipod? I can go on itunes and highlight single/multiple items and change the artwork and my computer will confirm it but when I look on my Ipod it doesnt display any art work or allow me to change the artwork that is already there? i need help please!

    Album artwork can be added/changed on songs via the iTunes Get Info menu item from the File menu. Note that music that you loaded from CDs will not have any artwork. If you want to aquire artwork you can try the File menu item Library > Get Artwork or you can download artwork from the internet, etc. Note that just changing artwork on your computer won't affect the iPod until you sync.
    If the artwork is correct on your computer iTunes then delete all the music on your iPod by syncing with iTunes with no music selected. Then reload the music onto your iPod by again syncing with iTunes with all the music you want selected.

  • Development and Quality server using different screen color setting

    Hi,
    I want to differentiate the Development and Quality server using different screen colors,
    How can I set different color logon screen for the different kinds of servers.
    Thank You.
    Best Regards,
    M.Thirumoorthi
    [email protected]

    Hi Thiru moothi,
    Please check these links :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/modifyingtheLogon+Page&
    Custom Password Change Page
    Custom Portal Logon Page
    Reward points if handy!
    Cheers,
    Sandeep
    Edited by: Sandeep Tudumu on Mar 26, 2008 7:41 PM

  • Why we use different clearing account for GR/IR and planned cost clearing a

    My client ask for using same account for GR/IR account and all planned cost clearing account.
    i try to convince it should be different accounts but he needs a logical answer.
    Why we use different clearing account for GR/IR and planned cost clearing accounts?

    Dear friend.
    u just tell him while doing GR it will debited n  while doing IR it should get credited.hence we  need to take diff G/L account or same account.
    regds
    nasir

  • I use different languages in my daily activities, when typing other than English Mac does not recognize them, is there anyway can Mac stop suggesting or automatically correcting me?

    I use different languages in my daily activities, when typing other than English Mac does not recognize them, is there anyway can Mac stop suggesting or automatically correcting me?

    Is this a problem with the computer or with the word processor? MS Word for example seems to think its grammar and spelling are better than mine - they are not. You have to go into MS Word preferences and uncheck all the useless "help" it wants to provide.

  • I have been having trouble with my iphone 4 for the past day . i tried to update it to 7.0.4 then the screen went blank and it keeps telling me to connect to itunes . I have connected it to 2 computers , using different cords

    I have been having trouble with my iphone 4 for the past day . i tried to update it to 7.0.4 then the screen went blank and it keeps telling me to connect to itunes . I have connected it to 2 computers , using different cords and it doesnt recognize it . It says it is in recovery mode and i need to restore . after clicking restore it says that my iphone cannot be restored . I am very frustrated because i have been online searching for solutions all day and nothing seems to work . As soon as i turn on my phone it goes to the apple logo for about 2 seconds then the connect to itunes screen . SOMEBODY PLEASE HELP ! my phone is my life and i need it back on .

    Connect the device to iTunes and restore from the most current backup.
    If the issue continues, restore as new.

  • XML Publisher Bursting using different locale settings

    Hi,
    I have a report that shows numeric fields in different format mask if I select different template each time while submitting request. One template file's language is English and its territory is United States. Other template file's language is German and its territory is Germany. English template shows number like 1,500.94 ( "," comma as digit grouping symbol and "." period as decimal symbol) which is fine. German template shows 1.500,94 ( "." period as digit grouping symbol and "," comma as decimal symbol). So everything is great for me until I am using XML Bursting. Even if I specified german templates in bursting control file the output pdf file shows numeric character like English template. (e.g  1,500.94).
    Example of bursting control file
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
    <xapi:request select="/">
    <xapi:delivery>
    <xapi:filesystem id="file1" output="${DEST_PATH}.pdf"/>
    </xapi:delivery>
    <xapi:document output-type="pdf" delivery="file1">
    <xapi:template type="rtf" location="xdo://XXCO.XXCO_INVOICE.de.DE/?getSource=true" filter="" >    --->  It gives same output  with en.US
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    Has anyone got any idea what is going on when bursting take care of generating PDF file again after the report is completed ?  Could you please help on this issue ? I will be grateful if I solve this problem. Thanks in advance.
    Regards,
    Ugur

    Hi,
    I have solved this issue by using <?xdoxslt:xdo-format-number, '999G990D00', 'da-DK')?> in every number fields instead of using different template file with danish language. Bursting also correctly shows number I wanted to be after this changes. So don't bother using different template file in order to show different digit grouping and decimal symbol. It's very simple this way except page total and carried forward totals. I choose number-separators=',.' option in xdofo:show-carry-forward tags.

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

  • My wife and I share an iCloud account for photo library and iCloud drive mainly for our family photo management, but we use different accounts for iMessage/facetime/calendar/etc. With Yosemite, I can't use continuity/handoff without dumping the photo

    my wife and I share an iCloud account for photo library and iCloud drive mainly for our family photo management, but we use different accounts for iMessage/facetime/calendar/etc. With Yosemite, I can't use continuity/handoff without dumping the primary photo iCloud account and thus our shared photo system. We are running yosemite OS X 10.10 and iOS 8.0.2... Is there any way to do this?

    my wife and I share an iCloud account for photo library and iCloud drive mainly for our family photo management, but we use different accounts for iMessage/facetime/calendar/etc. With Yosemite, I can't use continuity/handoff without dumping the primary photo iCloud account and thus our shared photo system. We are running yosemite OS X 10.10 and iOS 8.0.2... Is there any way to do this?

Maybe you are looking for