Generate and Compile new classes during runtime

Hi!
I use the Parser-Generator JavaCC to build a parser from a BNF-Grammar.
During runtime, the user shall be able to change the
grammar, so the Parser-Generator will build new .java-Files for the new Parser.
Does anyone know any Java-Generic-Methods to use .java-Files in a program? Or do they have to be compiled with javac?
Or does perhaps anyone know a Parser reading a BNF-Grammar-File and parsing according to this grammar?
Thanks a lot for possible Help, Henning.

Here is a link to a useful program with source code that uses javac. It creates a window and allows you to type in java source code and execute. I use it to test small java functions that I'm not very familiar with.
http://www.javaworld.com/javatips/jw-javatip131.html?#

Similar Messages

  • Dynamically Create and Compile Java Classes

    Hi,
    I have a requirement to dynamically create and compile Java classes and would like some advice on the best method to do so.
    Basically the project I am working on involves creating "Factors". Factors are items that have both attributes and weights so for example Factor A could have attribute B with weight 0.76, and attribute C with weight 1.33. There are a number of methods common to all factors such as calculateTotal, identify etc etc.
    At the moment the application has 5 factors, but there is a requirement to dynamically add and remove factors on the fly.
    I current solution I have been considering is using XML to describe the new class, build up the class and compile it; something along the lines of what is descibed at
    http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-xslt_p.html
    however i would like to consider all options.
    Any help with this is greatly appreciated.

    You want to dynamically create and compile Java classes.
    I would try the following:
    (1) Write the Source code of the new class into a text file with the name MyNewClass.java
    (2) compile this new .java-file with Runtime r = getRuntime();
    try {
        r.exec ("javac MyNewClass.java");
    } catch (IOException e) {
        System.out.println("ooops " + e.getMessage());
    } (3) somehow try to load that new class, maybe using ClassLoader cl = ClassLoader.getSystemClassLoader();
    cl.loadClass("MyNewClass");

  • Why does CS6 InDesign Book epub output generate and apply new graf and character style names in CSS?

    I created an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document. I worked absolutely as clean as I could.
    I synchronized the book to that single overall document several times, including immediately before exporting the book to epub. My export settings disallowed any local formatting. Character styles were restricted to one named "Italic" for which the only format applied was Italic in the Font Style field, and one named "Small Caps" for which NO formatting was included in the character style.
    There was, as far as I can see, no reason for any character or paragraph styles to export to anything but identically-named CSS entries. That is to say, any text with the character style "Italic" applied in the InDesign doc should have output with the same text with a span class entry of "Italic" around it.
    I still ended up with p and span CSS entries with extra numbers appended to them:
    span.Italic {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-1 {
    font-variant:normal;}
    span.Italic-1 {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-2 {
    font-variant:normal;}
    span.Italic-2 {font-style:italic;
    font-weight:normal;}
    span.Small-Caps-3 {
    font-variant:normal;}
    span.Italic-3 {
    font-style:italic;
    font-weight:normal;}
    and
    p.x-SECTION-BREAK, p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, p.x-SECTION-BREAK-3  and so on.
    Why would the InDesign epub output engine choose to generate and apply new spans and paragraph-level styles, which multiply the complexity of editing the CSS directly? How can I prevent InDesign from doing this?

    Perhaps I wasn't clear. When I wrote "an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document" I meant to emphasize  the part where I CLEARLY said "UNTIL text was copied over." The text I copied over had plenty of paragraph styles. I was trying to point out that each individual document had no PREVIOUSLY EXISTING character or paragraph styles that might have added complexity to the epub output. .
    So, every paragraph in each document had a paragraph style attached, a total of maybe 20 different paragraph styles throughout the book. The only CHARACTER LEVEL styles I cared about exporting were Italic, for text that was set in italic, and Small Caps, for CAPITALIZED text that I wanted to be able to make smaller in the CSS, since I am not allowed to embed fonts and therefore have no other way of creating small caps in the xhtml files inside the epub.
    So, given that I had two character styles applied to various bits of text throughout my InDesign book ("Italic" and "Small Caps"), I would like to know why there are multiple CSS entries generated: Italic, Italic-1, Italic-2, Small Caps, Small Caps-1, Small Caps-2, and so on.
    Ditto paragraph styles. I had a paragraph style called "SECTION BREAK" in each document. Not only did paragraph style "SECTION BREAK" contain identical specs in each document--I know they did because I copied each from one single doc where they were being used identically--but I also synchronized the book repeatedly.  So why would the xhtml docs and the CSS output need p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, and p.x-SECTION-BREAK-3?

  • Compile and call the class during the runtime

    Hi guys,
    I am struggling with a project, which allow user to modify the behavior of the program.
    To do this, my Java code must be able to compile the Java code (*.java) and call the class from the code during the runtime.
    Here are my code:
    com.sun.tools.javac.Main javac = new com.sun.tools.javac.Main();
    String[] options = new String[] {"d:\\javaExternal\\RunTimeCompilation.java"};
    System.out.println(Main.compile(options));This allows me to compile the .java file into .class file. However, I can't find the way to access/use the .class file.
    Do you guys have solution for this?
    Thanks a lot.

    You will also need to investigate class unloading and proxies since presumably they can modify the file and compile it again.
    Might note that in general this seldom works for business solutions. It seems like allowing the users to add their own functionality would be a good idea so the programmers don't have to keep doing it. But the reality is that then the users must become programmers. And often must be pretty good at it as well since they must not only know the programming language but also the framework too. The second problem is that it also becomes a maintenance nightmare for the real developers to upgrade the existing system.

  • Generating and compiling jaxb 1.0 source with jaxb 2.0 binaries

    Hi
    Does anyone know if v 2.13 is backwards compatible in terms of generating the source files for version 1 and also compiling and deploying the code?
    I am developing a project that needs to use jaxb 1.0 and jaxb 2.0 for legacy reasons. I have downloaded 2.1.3 an managed to use xjc to generate the new code (2.1) but when I try and generate the 1.0 classes I get this error
    Couldn't load Resource 1.0/com/sun/xml/bind/JAXBAssertionError.class
    java.lang.NoClassDefFoundError: com/sun/xml/bind/JAXBAssertionError
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultEx
    cutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/JAXBAssertionError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at com.sun.tools.xjc.Options.class$(Options.java:154)
    at com.sun.tools.xjc.Options.findServices(Options.java:482)
    at com.sun.tools.xjc.Options.<clinit>(Options.java:154)
    at com.sun.tools.xjc.XJCTask.<init>(XJCTask.java:49)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruc
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegating
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:49)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    And this is the ant build file
    <?xml version="1.0" encoding="windows-1252"?>
    <project name="jaxb" default="compile" basedir=".">
    <path id="classpath">
    <pathelement location="activation.jar"/>
    <pathelement location="jaxb-api.jar"/>
    <pathelement location="jaxb-impl.jar"/>
    <pathelement location="jaxb1-impl.jar"/>
    <pathelement location="jaxb-xjc.jar"/>
    <pathelement location="jsr173_1.0_api.jar"/>
    </path>
    <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
    <classpath refid="classpath"/>
    </taskdef>
    <target name="compile">
    <xjc schema="import.xsd" destdir="generated"
    package=".jaxb.importxsd" source="1.0" target="1.0" />
    </target>
    </project>
    I have checked the classpath and there is nothing untoward there and
    all the jars are in the same folder as the ant file. I thought jaxb
    2.1 is meant to be backwards compatible?
    Many thanks for your help.
    With the version of the JAXB binaries installed with the web services pack I get this error message instead
    Class com.sun.tools.xjc.XJCTask$AntElement loaded from ant loader (parentFirst)
    ResourceStream for 1.0/com/sun/tools/xjc/XJCTask$AngProgressCodeWriter.class loaded from ant loader
    BUILD FAILED
    java.lang.IncompatibleClassChangeError: Implementing class
    It seems to want to load the 1.0/com...version of xjc but has loaded the 2.0 version already.

    Hi,
    Can you please check your classpath incase there are still jaxb-ea jars in it.
    We have had such problems reported to us because of this reason.
    If the problem still persists can you pls provide more information like the stack trace the schema files etc.
    Thanks,
    Bhakti Mehta
    Sun Microsystems Inc.

  • Free Form Template and Combining Chart Values during Runtim

    Hi Guys,
    Need your expertise on this.  We received some unreasonable request for the following:
    1. Free Form Template DURING Runtime
    - moving charts from one place to another by dragging them from one place to another during runtime
    2. Combining of Chart values during Runtime
    -to be able to mash-up 2 different charts during runtime.  For example, dragging a chart to another chart
    would result to a combined-value of chart.  For instance, you have a Sales Chart and a Production Chart,
    if and when Sales Chart is dragged and placed on top of Production Chart then it would mash-up the values
    and will produce only one chart.
    Is this even possible?
    Hope you guys can help.
    Kind Regards and Many Thanks,
    Mark

    Hi Mark
    1. Free form template is not possible with current version of Dashboard Designer.  You may use the option of Dynamic Visibility to simulate this.  But this might not serve your requirement 100 %.
    2. Your requirement of mixing up chart just by dragging and droping on another is coming under Designing part.  For designing we need software, in my point of view.  Xcelsius is a Tool to generate required output in various formats.  Here we need to finalise the output such as chart type/ data to be displayed/ format to be displayed, etc and while viewing we may play with data but not with objects other than dynamic visibility.
    Hope this clarifies.
    With best wishes
    BaaRaa.

  • Need to apply dragging event on Columns and Rows on TableLayoutPanel during runtime in user defined IDE

    Environment: -
    OS: - Windows 7 32 bit
    IDE: - Visual Studio IDE 2008
    Language: - VB .Net
    Application Type: - Exe Application
    Application Name: - Designer.exe
    Requirement Type: -
    Critical
    Product Description: - We have exe project, which creates
    Designer.exe.  Designer.exe is an IDE for designing form on run time. We received a requirement from client to add another component on Panel. In Panel we have already added following components like (Text
    Box, Label, Combo Box, List, Grid etc)
    Now we had to add another component “TableLayoutPanel”, and we have added it properly in it, and tried to provide required properties of TableLayoutPanel
    in Designer.exe.
    Requirement Description: -
    We have stuck at a point, where we need inputs for further development. We are not able to drag rows and columns for adjusting Table layout on run time.
    We need to know, what kind of event, we will have to write, so that we can hold particular row or column and drag it to the required position in Table Layout Panel.
    E.g.

    Here is the example of how you can do this.  Try it in a new Form project first by following these steps.
     First create your Form project and on the VB menu click (Project) and select (Add Class).  Name the class (TableLayoutPanelEx.vb). Now copy the class code below and paste it into the new class you just added.
    Public Class TableLayoutPanelEx
    Inherits TableLayoutPanel
    Private Const WM_NCHITTEST As Integer = &H84
    Private Const WM_MOUSEMOVE As Integer = &H200
    Private Const WM_LBUTTONDOWN As Integer = &H201
    Private Const WM_LBUTTONUP As Integer = &H202
    Private Const MK_LBUTTON As Integer = &H1
    Private VBorders As New List(Of Integer)
    Private HBorders As New List(Of Integer)
    Private selColumn As Integer = -1
    Private selRow As Integer = -1
    Public Sub New()
    Me.DoubleBuffered = True
    Me.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single
    End Sub
    Protected Overrides Sub OnHandleCreated(ByVal e As System.EventArgs)
    MyBase.OnHandleCreated(e)
    If Not Me.DesignMode Then ResetSizeAndSizeTypes()
    End Sub
    Public Shadows Property ColumnCount() As Integer
    Get
    Return MyBase.ColumnCount
    End Get
    Set(ByVal value As Integer)
    MyBase.ColumnCount = value
    If Me.Created And Not Me.DesignMode Then ResetSizeAndSizeTypes()
    End Set
    End Property
    Public Shadows Property RowCount() As Integer
    Get
    Return MyBase.RowCount
    End Get
    Set(ByVal value As Integer)
    MyBase.RowCount = value
    If Me.Created And Not Me.DesignMode Then ResetSizeAndSizeTypes()
    End Set
    End Property
    Public Sub ResetSizeAndSizeTypes()
    Dim cW As Single = CSng((Me.ClientSize.Width \ Me.GetColumnWidths.Length) - 1)
    For c As Integer = 0 To Me.GetColumnWidths.Length - 1
    Me.ColumnStyles(c).SizeType = SizeType.Absolute
    Me.ColumnStyles(c).Width = cW
    Next
    Dim cH As Single = CSng((Me.ClientSize.Height \ Me.GetRowHeights.Length) - 1)
    For r As Integer = 0 To Me.GetRowHeights.Length - 1
    Me.RowStyles(r).SizeType = SizeType.Absolute
    Me.RowStyles(r).Height = cH
    Next
    End Sub
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    MyBase.WndProc(m)
    If Me.Created And Not Me.Disposing Then
    If m.Msg = WM_NCHITTEST Then
    Dim loc As Point = Me.PointToClient(MousePosition)
    VBorders.Clear()
    HBorders.Clear()
    If Me.ColumnCount > 1 Then
    For w As Integer = 0 To Me.GetColumnWidths.Length - 2
    If w = 0 Then
    VBorders.Add(Me.GetColumnWidths(w))
    Else
    VBorders.Add(VBorders(VBorders.Count - 1) + Me.GetColumnWidths(w))
    End If
    Next
    End If
    If Me.RowCount > 1 Then
    For h As Integer = 0 To Me.GetRowHeights.Length - 2
    If h = 0 Then
    HBorders.Add(Me.GetRowHeights(h))
    Else
    HBorders.Add(HBorders(HBorders.Count - 1) + Me.GetRowHeights(h))
    End If
    Next
    End If
    Dim onV As Boolean = (VBorders.Contains(loc.X) Or VBorders.Contains(loc.X - 1) Or VBorders.Contains(loc.X + 1))
    Dim onH As Boolean = (HBorders.Contains(loc.Y) Or HBorders.Contains(loc.Y - 1) Or HBorders.Contains(loc.Y + 1))
    If onV And onH Then
    Me.Cursor = Cursors.SizeAll
    ElseIf onV Then
    Me.Cursor = Cursors.VSplit
    ElseIf onH Then
    Me.Cursor = Cursors.HSplit
    Else
    Me.Cursor = Cursors.Default
    End If
    ElseIf m.Msg = WM_LBUTTONDOWN And Me.Cursor <> Cursors.Default Then
    Dim loc As Point = Me.PointToClient(MousePosition)
    selColumn = -1
    selRow = -1
    For c As Integer = 0 To VBorders.Count - 1
    If VBorders(c) >= loc.X - 1 And VBorders(c) <= loc.X + 1 Then
    selColumn = c
    Exit For
    End If
    Next
    For r As Integer = 0 To HBorders.Count - 1
    If HBorders(r) >= loc.Y - 1 And HBorders(r) <= loc.Y + 1 Then
    selRow = r
    Exit For
    End If
    Next
    ElseIf m.Msg = WM_MOUSEMOVE And m.WParam.ToInt32 = MK_LBUTTON Then
    Dim loc As Point = Me.PointToClient(MousePosition)
    If Me.Cursor <> Cursors.Default Then
    If selRow > -1 And loc.Y >= 1 And loc.Y <= Me.ClientSize.Height - 2 Then
    Me.RowStyles(selRow).SizeType = SizeType.Absolute
    Dim ref As Single = loc.Y - Me.RowStyles(selRow).Height
    If selRow > 0 Then ref -= HBorders(selRow - 1)
    If Me.RowStyles(selRow).Height + ref > 0 Then
    If Me.RowCount > selRow + 1 Then
    If Me.RowStyles(selRow + 1).Height - ref < 1 Then Exit Sub
    Me.RowStyles(selRow + 1).Height -= ref
    End If
    Me.RowStyles(selRow).Height += ref
    End If
    End If
    If selColumn > -1 And loc.X >= 1 And loc.X <= Me.ClientSize.Width - 2 Then
    Me.ColumnStyles(selColumn).SizeType = SizeType.Absolute
    Dim ref As Single = loc.X - Me.ColumnStyles(selColumn).Width
    If selColumn > 0 Then ref -= VBorders(selColumn - 1)
    If Me.ColumnStyles(selColumn).Width + ref > 0 Then
    If Me.ColumnCount > selColumn + 1 Then
    If Me.ColumnStyles(selColumn + 1).Width - ref < 1 Then Exit Sub
    Me.ColumnStyles(selColumn + 1).Width -= ref
    End If
    Me.ColumnStyles(selColumn).Width += ref
    End If
    End If
    End If
    ElseIf m.Msg = WM_LBUTTONUP Then
    selColumn = -1
    selRow = -1
    End If
    End If
    End Sub
    End Class
     Now you need to build the project.  Go to the VB menu and click (Build) and then select (Build
    NameOfYourProject).   After it builds you can go to the Form`s [Design] tab and drag one from the top of the Toolbox onto your Form. 
    IMPORTANT - Then set the RowCount and
    ColumnCount to the maximum number of rows and columns you want to let the user add. 
    That has to be done at design time.
     Next you need to add 2 NumericUpDown controls to the Form and name them (NUD_Rows) and (NUD_Columns).  Then you can add the code below to the Form`s code.
    Public Class Form1
    Public Sub New()
    InitializeComponent()
    'Set the minimum of the 2 NumericUpDown controls for the rows and columns to 1
    'Set the maximum of the 2 NumericUpDown controls to the number of rows and columns you have set in the [Design] tab properties
    NUD_Rows.Minimum = 1
    NUD_Rows.Maximum = TableLayoutPanelEx1.RowCount
    NUD_Columns.Minimum = 1
    NUD_Columns.Maximum = TableLayoutPanelEx1.ColumnCount
    'Set to the rows and columns counts back to what you want for the default
    TableLayoutPanelEx1.ColumnCount = 4
    TableLayoutPanelEx1.RowCount = 4
    'Set the 2 NumericUpDown control values to the current count of rows and columns
    NUD_Rows.Value = TableLayoutPanelEx1.RowCount
    NUD_Columns.Value = TableLayoutPanelEx1.ColumnCount
    End Sub
    Private Sub NUD_Rows_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NUD_Rows.ValueChanged
    If Me.Created Then TableLayoutPanelEx1.RowCount = CInt(NUD_Rows.Value)
    End Sub
    Private Sub NUD_Columns_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NUD_Columns.ValueChanged
    If Me.Created Then TableLayoutPanelEx1.ColumnCount = CInt(NUD_Columns.Value)
    End Sub
    End Class
     You can now run the app and test it out.  You should be able to set the number of rows and columns with the 2 NumericUpDown controls and adjust the widths and heights of them with the mouse just like i did in the animated gif image i posted in
    my first post.
    If you say it can`t be done then i`ll try it

  • CBS generating and compiling on 7.31 for 7.0 track

    Hi  NWDI experts
    My NWDI is based on 7.0 hosts both JDK1.4 and 1.6 for 7.0 and 7.3 tracks respectively.
    But the CBS is generating and building 7.31 code and giving errors for a 7.0 track.
    The Build Variant , CBS Visual Admin settings for both JDKs and Track Dependencies are looking fine. But I am not sure why CBS is generating 7.31 code and giving compile time issues for the track DCs.. may I know how can we fix these issues?
    When I check the build log in CBS , it seems it is using WD Plugin version 7.30 SP1 to generate the source code for WD project and giving compile time issues.
    Build Plugin 'WebdynproPlugin', Version 7.30 SP 1 (NW731CORE_01_REL, built on 2011-09-17 17:11:55 +0200, CL155733)

    Hi Ervin,
    I checked the track's dependencies in Development and Consolidation tabs, I found that one of our team imported a Dependency (EP_BUILDT/) with 7.31 for this 7.0 track and I am thinking thats why all the DCs are failing to build.
    The track was working fine 3 months back and this 7.31 dependency (EP_BUILDT/)was imported in March.
    Could you please let me know , how can I delete this 7.31 dependency (EP_BUILDT/)?
    I am trying to import 7.0 version of the same, but it is giving error that already the higher version is imported.
    Component (Vendor/Name/Location/Counter sap.com/EP_BUILDT/SAP AG/20090815234300) specified in the file (/usr/sap/xxx/CMS/inbox/EPBUILDT20_0-10003786.SCA) has already been imported into the system (Domain/Name xx/xxxxx_D) in a higher version.

  • Load Class during Runtime

    1.How to load the class during run time with out creating an instance of an object?.
    Eg.
    class A,class b,class C,class D
    1.Class D extends Applet get some values from the html through getparameter method.
    2.Class C get the values from the Class A.
    3.class A,B Extends Frame class ,it get the values from Class C.
    Problem:=
    In Class D ,I Create an object for class A & call a method in that class A which is decalred as public in Init() method of on class D.After that i should down load the class B in Internet and i should call a particular public method in that class in the same Class D.is it possible through Class t = Class.forName("B"),method.invoke(). how can i use this class to do that?i need the example Applet Program for that?that applet should work in all browser.(Appilicable for java1.1)

    If it's a static method, just call it in the usual way:B.someStaticMethod();This will load the class and execute the method. If it's an instance method, you will need an instance of the object to call it.

  • Creating and compiling JavaFX objects at runtime

    I am interested in the possibility of creating JavaFX objects at runtime where their definition is not know until runtime and am unsure about how to do this. Clearly I will need the JavaFX Script compiler at runtime which I guess is not that much of a problem but I am looking to accomplish this within the browser context so it would mean that I need the compiler to be available as part of the standard JRE much in the same way as the JavaFX Script interpreter is to obviate the need for it to be downloaded.
    Does anyone know if the JavaFX Script compiler is available as a built-in component within the latest versions of the JRE? If not, is it planned to include it in the future (JSE 7 perhaps)?
    Thanks,
    The Gibbon

    Perhaps the thread [Dynamic Scripting, how?|http://forums.sun.com/thread.jspa?threadID=5379268] can help.

  • Creating and compiling new timezone

    Hi everyone,
    I have a liitle problem here with the timezone compilation (using "zic") and two questions.
    I live in Uruguay (GMT -3). This year, the authorities decided that we will have DST, going one hour forward the first sunday of october and 1 hour backward the second sunday of march.
    So, here goes the firs one:
    How do I report the new timezone with the DST changes to MAC OSX developers (or someone) so they made an update for the Montevideo - Urugay timezone ??
    And now the second:
    ... Meanwhile, I tryed to compile the new timezone myself, so I did this:
    I've made the timezone archive like this:
    #Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
    Rule Uruguay 2006 maximum - Oct Sun>=1 2:00 1:00 D
    Rule Uruguay 2006 maximum - Mar Sun>=8 2:00 0:00 -
    #Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
    Zone America/Montevideo -3:00 Uruguay UY%sT
    Then, I've compiled it using zic...
    Ok, so the timezone for Montevideo - Uruguay seems to be correct now (executing the "date" command)... but when I look at the clock at the top of the screen, it appears to be one our late... but that's not all... there's more:
    If I look at the analog clock in the "set date & time" preferences, it's ok, with the new timezone and the correct time... but the digital one (that apears over the analog) is one our late too.
    There's even more: If I open the iCal... the scheddules remain ok, at the correct time... but the labels on each scheddule are one our late...
    Am I doing somethig wrong with the zic and timezone?
    Is the digital clock reading the time from another archive rather than the regular timezone archive?
    Thanks in advance !!

    I've the same problem. I'm in Montevideo, Uruguay too and created my own Timezone file (http://warpzone.homeip.net/Uruguay.txt) based on a old timezone file I had.
    The problem is the same as related here, the clock at the menu bar has the time without the daylight savings applied. If I select the clock outside the bar (in window mode) it works fine BUT the "24-hour mode clock" does not work.. it still shows the time in 12-hour format.
    If I type "date" in Terminal, I get the correct time and timezone.
    Any ideas?

  • Compiling new classes on the fly without having a .java file

    Hi everybody,
    I'd like to compile dynamically produced JAVA code (code from user input in my application). I don't wanna store the source code in a .java file, but just compile the code (as char[] or something like that) to a byte[].
    Does anybody have an idea ??
    Thanks
    Jan

    Have you looked at the idea of interpreting rather than compiling, say using Jython (a python interpreter written in Java). Python and Java are extremely close in syntax, and it should be relatively easy to do what you are talking about.
    I am worried though, that you are going to let users type in text, and assume that it has valid syntax in the language you are using. Many years of UI experience indicate that letting users type in anything results in a certain error rate. Letting it be instructions you are to follow in your code is even more dangerous.
    There are many programs that let users define actions interactively. They seem to either let the user type in text, and error check it to death (a lot of work, think spreadsheet type programs), or they present the user with a set of choices, often using a wizard type interface, which takes more up front UI work, but only lets the users select valid options.
    It sounds like you want to interpret what the user types in as instructions. Even with Jython (or a similar interpreter), you would need to parse the user input for formatting errors, invalid variable names, and anything else they could make a mistake on, before you could pass any of it to the interpreter.
    Good luck.

  • Problem with large option class during runtime 11.5.10

    It seems like our Oracle Configurator has a problem with loading multiple large option classes with about 10,000 items under it. We are running 11.5.10. My guess is that Oracle has to load everything in the option class and at some point the server just gives up after loading so much data.
    Basically the model looks like this and was set up by Oracle themselves in 04. Overtime the option classes grew.
    --Base model
    ----Model A instance 1
    --------option class
    ------------10000 items
    ----Model A instance 2
    --------option class
    ------------10000 items
    ----Model A instance 50
    --------option class
    ------------10000 items
    Is there an optimal amount for an option class? Is the model structure possibly outdated and we should break up the option classes into models to alleviate some of the pain? Or are we at the limitation that Oracle Configurator can do and should peruse a custom solution?

    Funny thing really because the Case study for Chapter 4 is from our company that Oracle put together for us and its not working in the sense that it seems the servers can't handle the current model structure. I wouldn't blame the UI for these crashes and we already hide stuff from the user (ie, having to sort through all 10,000 items and hiding the BOM structure). Quick story of why i want to try and fix it is becuase the way its set up now in the model document is that 3 people could kill the server by basically saying "ok i selected this item for this location" (which would load the 10,000 items into memory on the server and not to the UI upon selection of the model) and then they would say... "ok now copy this selection to all these 50 places" (which would load those items again for each place that the item had to copied to) and BOOM server dead. I think sandeeps diagram of the changes is a really good idea and could help out alot and I tossed out that idea a few times before around my work place to help with the server issues. I feel that it would work but is it also possible that maybe configurator can't support our model the way they are wanting it to work?

  • Why JSP not use new class that I compile again?

    I use bean class with JSP. But When I add some code and compile new bean. JSP not use new been class it use old class.
    I try to set file server.xml and set <DefaultContext reloadable="true"/> and restart Tomcat. But it not work?
    any help please?

    I run JSP in http://localhost:8080/stringbean.jsp
    is context name mean localhost
    in c:\tomcat\work has following directory
    standalone (level1 dir)
    localhost (level2 dir)
    - (level3 dir)
    examples (level3 dir)
    manager (level3 dir)
    tomcat-doc (level3 dir)
    webdav (level3 dir)

  • Compiling and putting java classes in database schema

    hi..good evening to all...
    I have total 7 java classes which i have to compile and put in the database schema. those 7 classes are interdependent on each other thats why there is a particular order of execution.
    i want to compile and put them in the schema thorugh the command line.
    i have tried doing this one by one by executing the following command in cmd...
    D:\>loadjava -u username/password@sid -v -resolve javaclassname.java
    then its working fine..
    But i have to do this in one time i.e i have to compile and put all the 7 classes in schema by a single command.
    Thats why i have put all the 7 classes one by one in the required order...save the file as 'java_sources.java' and then run the following command...
    D:\>loadjava -u username/password@sid -v -resolve java_sources.java
    but it is not working... :(
    please help...thanks in advance

    Hi,
    It is not required to load one by one class files into the schema. Can create a jar file for all the class files and load the jar file using the '-o' option in loadjava
    eg:
    loadjava -u username/password@sid -v -r -o jar_file_name.jarI hope you might use any IDE to develop the java class files. All the IDE have option to develop jar file if not get oracle JDeveloper for easy option.
    Check the version of jdk used in your oracle server and use appropiate version of Jdeveloepr and compile the classes.
    If your class files use any builtin library jar files those also need to be loaded.
    As thomaso said if pasted with errors can resovle easier
    NB:
    http://download.oracle.com/docs/cd/B10500_01/java.920/a96659/02_load.htm

Maybe you are looking for

  • Installed Snow Leopard & now EVERY APP  IS CRASHING

    I thought my Adobe CS3 was the worst of it. Until I tried to send an email with an attachment. EVERY TIME I try to attach a file, Mail crashes. This is so awful. I am having problems with EVERY application I open. Firefox crashes when I try to downlo

  • Html to struts converter

    Are there any tools to convert html to struts? Thanks

  • Nokia n97 - In the US, how do I get my contacts to...

    Hello all..... I am with ATT in the US, we have +1 as prefix.. Whenvever i receive a text message, I dont see the name of the sender... I just see the +1 and the number. The problem is how do I get rid of +1 prefix? Thanks for the help......

  • ALSB 3.0: Resume action behavior like the Skip action

    Hi, I have a Proxy Service that receive a array. Then I do a For Each action to go through the array and call a Service callout for each element of the array. I also want to continue the processing of the array if a Service callout return a failed me

  • Scheduling a Process Flow

    Hi All, I wanted to run my process flow at a predefined schedule. I had created a schedule for the same. But how do I specify which mapping need to be run on this schedule and how do I deploy this schedule. I am not able to see this schedule in my Lo