Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. is it possible?

is it possible?

Scheduled Pinned Locked Moved JavaScript
javajavascriptvisual-studiohelpquestion
40 Posts 4 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hakan Bulut
    wrote on last edited by
    #1

    from Javascript codes to Java code to have an executable file? and I want to a java compiler for windows 7 32bit anyone can help on this topic from where I have a Java IDE on internet?

    J D 2 Replies Last reply
    0
    • H Hakan Bulut

      from Javascript codes to Java code to have an executable file? and I want to a java compiler for windows 7 32bit anyone can help on this topic from where I have a Java IDE on internet?

      J Offline
      J Offline
      Jasmine2501
      wrote on last edited by
      #2

      That's kind of like wanting to translate Beethoven's 5th into French. Javascript and Java aren't related. There are ways to write executable programs in Javascript, but there's no reason to translate that JS to Java before making it executable... Create desktop apps with JS - Javascript-EXE[^] Write executables using JScript.Net[^]

      H 1 Reply Last reply
      0
      • H Hakan Bulut

        from Javascript codes to Java code to have an executable file? and I want to a java compiler for windows 7 32bit anyone can help on this topic from where I have a Java IDE on internet?

        D Offline
        D Offline
        dusty_dex
        wrote on last edited by
        #3

        >"from Javascript codes to Java code to have an executable file?" No. But you can compile javascript to java using the JS.JAR file (Rhino shell). But you can not get pure binary .exe this way. You would be better off coding in Java directly which can create .exe via JNI

        H 1 Reply Last reply
        0
        • D dusty_dex

          >"from Javascript codes to Java code to have an executable file?" No. But you can compile javascript to java using the JS.JAR file (Rhino shell). But you can not get pure binary .exe this way. You would be better off coding in Java directly which can create .exe via JNI

          H Offline
          H Offline
          Hakan Bulut
          wrote on last edited by
          #4

          Well can you advance what i can do this I have an Eclipse Jee Java SR2-Classic IDE but i have no any knowledge about this compiler.

          D 1 Reply Last reply
          0
          • H Hakan Bulut

            Well can you advance what i can do this I have an Eclipse Jee Java SR2-Classic IDE but i have no any knowledge about this compiler.

            D Offline
            D Offline
            dusty_dex
            wrote on last edited by
            #5

            Q. But why Java? I thought you wanted to create webpage and use Javascript. I have no experience setting up Eclipse, which is not a compiler it is a IDE (a front end user interface). any Java JDK will provide a compiler, but they will not compile javascript to java. Perhaps you should consider using Microsoft Visual Studio (Express) and forget about java and javascript. My own preference has always been to compile using command line tools. javac.exe etc.

            H 1 Reply Last reply
            0
            • D dusty_dex

              Q. But why Java? I thought you wanted to create webpage and use Javascript. I have no experience setting up Eclipse, which is not a compiler it is a IDE (a front end user interface). any Java JDK will provide a compiler, but they will not compile javascript to java. Perhaps you should consider using Microsoft Visual Studio (Express) and forget about java and javascript. My own preference has always been to compile using command line tools. javac.exe etc.

              H Offline
              H Offline
              Hakan Bulut
              wrote on last edited by
              #6

              Javascript is currently working on a combination of lottery was almost the only part that I'm almost finished lottery result data connected with the link. How do I get linked variable in Java or sample code Do you have any idea on this topic? I want to create to this project for tablet or phone. I translated to Java it's some

              D L 2 Replies Last reply
              0
              • H Hakan Bulut

                Javascript is currently working on a combination of lottery was almost the only part that I'm almost finished lottery result data connected with the link. How do I get linked variable in Java or sample code Do you have any idea on this topic? I want to create to this project for tablet or phone. I translated to Java it's some

                D Offline
                D Offline
                dusty_dex
                wrote on last edited by
                #7

                Do you need to pass Javascript variable --> Java, or from Java variable --> Javascript? Which? docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/#jsengine

                1 Reply Last reply
                0
                • H Hakan Bulut

                  Javascript is currently working on a combination of lottery was almost the only part that I'm almost finished lottery result data connected with the link. How do I get linked variable in Java or sample code Do you have any idea on this topic? I want to create to this project for tablet or phone. I translated to Java it's some

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  You may need to think about creating a Java applet[^].

                  Use the best guess

                  D 1 Reply Last reply
                  0
                  • L Lost User

                    You may need to think about creating a Java applet[^].

                    Use the best guess

                    D Offline
                    D Offline
                    dusty_dex
                    wrote on last edited by
                    #9

                    Funnily enough I was just getting the lo-down on this subject. JSObject isn't supported anymore and code signing has always been a barrier for such simple requirements. JSObject & EMBED tag Creating-a-Trusted-Applet-with-Local-File-System-Access-Rights.htm It's the prime reason I HATE JAVA as a web technology. Java Server Pages would probably be a better fit. Dead simple to pass info back and forth, and there's plenty of info out there. :)

                    L 1 Reply Last reply
                    0
                    • D dusty_dex

                      Funnily enough I was just getting the lo-down on this subject. JSObject isn't supported anymore and code signing has always been a barrier for such simple requirements. JSObject & EMBED tag Creating-a-Trusted-Applet-with-Local-File-System-Access-Rights.htm It's the prime reason I HATE JAVA as a web technology. Java Server Pages would probably be a better fit. Dead simple to pass info back and forth, and there's plenty of info out there. :)

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      dusty_dex wrote:

                      and there's plenty of info out there.

                      For those who can be bothered to look.

                      Use the best guess

                      D 1 Reply Last reply
                      0
                      • L Lost User

                        dusty_dex wrote:

                        and there's plenty of info out there.

                        For those who can be bothered to look.

                        Use the best guess

                        D Offline
                        D Offline
                        dusty_dex
                        wrote on last edited by
                        #11

                        Quote:

                        For those who can be bothered to look.

                        Yes, strange how this in-built desire to find out *new* stuff (a do it yourself attitude) is lacking in some people. Is it a modern disease of the internet age?

                        H 1 Reply Last reply
                        0
                        • D dusty_dex

                          Quote:

                          For those who can be bothered to look.

                          Yes, strange how this in-built desire to find out *new* stuff (a do it yourself attitude) is lacking in some people. Is it a modern disease of the internet age?

                          H Offline
                          H Offline
                          Hakan Bulut
                          wrote on last edited by
                          #12

                          import javax.swing.*;
                          public class RandomNumber {

                          /\*\*
                           \* @param args
                           \*/
                          public static void main(String\[\] args) {
                              int IsToken\[\]  = {
                                      9,10,38,40,46,48,
                                      11,40,42,45,47,48,
                                      1,19,26,30,31,48
                                      };
                              int lucky\[\];
                              int column;
                              final int MAX\_DATA = 49;
                              int\[ \] arLotto = new int\[MAX\_DATA\];
                              for(var i=0; i<MAX\_DATA; i++){
                                  if(private static boolean\[\] IsToken\[\] == true){
                                      else if(arLotto\[rnd\] != Istoken\[\]){
                                          arLotto\[rnd\] = lucky\[column\]
                                          column++;
                          
                                  }
                              }
                          
                              int rnd = (int) Math.round(49 \* Math.random());
                              //JOptionPane.showmessageDialog(null, "rnd")
                              System.out.print(lucky\[column\]);
                          }
                          

                          }

                          D L 2 Replies Last reply
                          0
                          • H Hakan Bulut

                            import javax.swing.*;
                            public class RandomNumber {

                            /\*\*
                             \* @param args
                             \*/
                            public static void main(String\[\] args) {
                                int IsToken\[\]  = {
                                        9,10,38,40,46,48,
                                        11,40,42,45,47,48,
                                        1,19,26,30,31,48
                                        };
                                int lucky\[\];
                                int column;
                                final int MAX\_DATA = 49;
                                int\[ \] arLotto = new int\[MAX\_DATA\];
                                for(var i=0; i<MAX\_DATA; i++){
                                    if(private static boolean\[\] IsToken\[\] == true){
                                        else if(arLotto\[rnd\] != Istoken\[\]){
                                            arLotto\[rnd\] = lucky\[column\]
                                            column++;
                            
                                    }
                                }
                            
                                int rnd = (int) Math.round(49 \* Math.random());
                                //JOptionPane.showmessageDialog(null, "rnd")
                                System.out.print(lucky\[column\]);
                            }
                            

                            }

                            D Offline
                            D Offline
                            dusty_dex
                            wrote on last edited by
                            #13

                            I think you will have problems with CP admins if you start posting Java code in a Javascript forum. :doh: I will take look at this new attempt, and change my name to Claire Voyant. :java:

                            H 1 Reply Last reply
                            0
                            • D dusty_dex

                              I think you will have problems with CP admins if you start posting Java code in a Javascript forum. :doh: I will take look at this new attempt, and change my name to Claire Voyant. :java:

                              H Offline
                              H Offline
                              Hakan Bulut
                              wrote on last edited by
                              #14

                              :))) This is funny. I am really not be hip this. I am trying to translate to codes from javascript to java :)

                              D 1 Reply Last reply
                              0
                              • H Hakan Bulut

                                :))) This is funny. I am really not be hip this. I am trying to translate to codes from javascript to java :)

                                D Offline
                                D Offline
                                dusty_dex
                                wrote on last edited by
                                #15

                                Hakan Bulut wrote:

                                :) )) This is funny. I am really not be hip to this.

                                Ya don't say. :-\ :omg: Well I can be thankful you are using array of numbers now. :)

                                H 1 Reply Last reply
                                0
                                • D dusty_dex

                                  Hakan Bulut wrote:

                                  :) )) This is funny. I am really not be hip to this.

                                  Ya don't say. :-\ :omg: Well I can be thankful you are using array of numbers now. :)

                                  H Offline
                                  H Offline
                                  Hakan Bulut
                                  wrote on last edited by
                                  #16

                                  yeah it is.. but i need some help on linked variable for IsToken numbers .txt *.js or any file extension to use it database record numbers to IsToken numbers a file integrated with Java language. At first i need to this file connected record numbers to do combination then. Do you know API or sample code about on this topic? Forexapmle: http://maverick.8m.net/loto.htm a little bit complete.. I'm using to this link. Any file to use it record database integrated with Java language. is it possible?

                                  D 3 Replies Last reply
                                  0
                                  • H Hakan Bulut

                                    import javax.swing.*;
                                    public class RandomNumber {

                                    /\*\*
                                     \* @param args
                                     \*/
                                    public static void main(String\[\] args) {
                                        int IsToken\[\]  = {
                                                9,10,38,40,46,48,
                                                11,40,42,45,47,48,
                                                1,19,26,30,31,48
                                                };
                                        int lucky\[\];
                                        int column;
                                        final int MAX\_DATA = 49;
                                        int\[ \] arLotto = new int\[MAX\_DATA\];
                                        for(var i=0; i<MAX\_DATA; i++){
                                            if(private static boolean\[\] IsToken\[\] == true){
                                                else if(arLotto\[rnd\] != Istoken\[\]){
                                                    arLotto\[rnd\] = lucky\[column\]
                                                    column++;
                                    
                                            }
                                        }
                                    
                                        int rnd = (int) Math.round(49 \* Math.random());
                                        //JOptionPane.showmessageDialog(null, "rnd")
                                        System.out.print(lucky\[column\]);
                                    }
                                    

                                    }

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #17

                                    Most of that code makes no sense at all. I would suggest you spend some time with your Java reference manual.

                                    Use the best guess

                                    H 1 Reply Last reply
                                    0
                                    • L Lost User

                                      Most of that code makes no sense at all. I would suggest you spend some time with your Java reference manual.

                                      Use the best guess

                                      H Offline
                                      H Offline
                                      Hakan Bulut
                                      wrote on last edited by
                                      #18

                                      Yeah bit of a problem free time..

                                      L 1 Reply Last reply
                                      0
                                      • H Hakan Bulut

                                        Yeah bit of a problem free time..

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #19

                                        That is real basic Java; you could work through the online tutorial in an hour or two.

                                        Use the best guess

                                        1 Reply Last reply
                                        0
                                        • H Hakan Bulut

                                          yeah it is.. but i need some help on linked variable for IsToken numbers .txt *.js or any file extension to use it database record numbers to IsToken numbers a file integrated with Java language. At first i need to this file connected record numbers to do combination then. Do you know API or sample code about on this topic? Forexapmle: http://maverick.8m.net/loto.htm a little bit complete.. I'm using to this link. Any file to use it record database integrated with Java language. is it possible?

                                          D Offline
                                          D Offline
                                          dusty_dex
                                          wrote on last edited by
                                          #20

                                          Thanks for the link. You can now remove it from Code Project if you like. :) I was going to post the code back and lost it all because my computer died just as I tried to save the file. :( As you can see I am now back online again. ;P I'll have to start again. tomorrow.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups