Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
i wonder if there is a php equivalent to jython so you can use java classes with php?
thanks
http://www.caucho.com/resin-3.0/quercus/
http://php-java-bridge.sourceforge.net/pjb/
I'm not quite sure what you are asking, since you are talking about two completely different things: a PHP equivalent to Jython, and accessing Java classes from PHP. So, I'm going to answer both.
Jython is a Python implementation for the JVM. So, the PHP equivalent would be a PHP implementation for the JVM. There are actually two that I know of: IBM's P8, which is part of Project Zero and Quercus.
However, you don't need to run your PHP on Java if you want to run it with Java. A PHP-to-Java bridge would be enough, you don't need a PHP-on-Java implementation. I know that at some point in the past at least one such bridge must have existed, because someone once told me that they used one, but that is about all I know.
I just googled php jvm and got a bunch of hits. Never tried any of them.
Well: Java Server Pages (JSP) are "equivalent" to PHP, but using java classes.
It's "equivalent" in that it's HTML with embedded java code, but not at all compatible to PHP syntax.
Fayer,
Try PHP/Java Bridge that integrates PHP and Java, as recommended in PHP manual (Java Class - dead- URL: www.php.net/manual/en/java.installation.php).
Please, let me know how it worked for you.
You may have to use Zend Server CE (www.zend.com/en/products/server-ce/), instead of Apache.
Best.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am learning java for first time. I have found it's very similar to haxe and flash as3.
However, i am also learning android. And in that i have learned that android overwrites many native java libs to improve speed or something.
Now this creates a problem...i am learning java separately because tutorials about android assume you know java. And this means continuing this path will result in me learning it one way and then the right way. Wasting brain...
So can someone clear confusion. Are all libs covered at http://developer.android.com/reference/packages.html ...or java in android also support more native libs. How would i know which libs are added/overwritten by android into native libs..
also can you suggest what libs/methods i should know to be not stuck at every step.
By libs i mean packages and methods.
Look here for Android Tutorials and docs, and use the reference you've already found.
http://developer.android.com/training/index.html
You may find it goes smoother if you finish learning Java first. The GUI is completely different from Java, but works well. Some Java Classes from older Android API levels are missing some methods, but that is all documented in the developer reference.
Learn Java, skip the graphical / GUI part and you're fine, I think. You can use almost everything from plain java. There are just minor differences like using threads. But that's nothing to worry about.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm writing an application in Java that I would eventually like to run on Android devices (right now it runs on desktop). I've recently been thinking about adding a scripting language, but am not sure what to pick.
My preference is Javascript/ECMAScript since I'm already familiar with it, but I can't find a pure java port of it, which I think would make it hard to compile into an Android executable (at least I think so. I don't know if/how Android handles JNI).
I was also thinking of Lua since a pure Java version does seem to be available under the MIT license. I believe Minecraft uses it for scripting.
If anyone else knows of any good scripting languages I ought to consider or a clean port of Javascript, please let me know.
Rhino is a pure Java implementation of JavaScript, which is co-bundled with JDK7. You can compile JavaScript to bytecode, or compile on-the-fly from JavaScript source.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Are there any decent BitTorrent libraries for Java? I need to program a simple torrent client, but it would be great if I didn't have to write everything from scratch.
Turn's TTorrent is a pure Java bit torrent library.
Snark by Three Rings is a very lightweight bitorrent library that will give you basic torrent features.
Was originally written by Mark Wielaard. A github source can be found here https://github.com/akerigan/born-again-snark
I have created a Bitlet Fork on Github.
It's LGPLed, and it's running faster than ttorent.
Azureus (now named Vuze) gives you a plugin API. Using this API you can plug your code into Azureus. Start it inside your program, and listen/respond to its events.
Azureus is written in Java - is most likely not "simple" but quite likely "decent" :)
Adding to answer from jjnguy : The code seems to be at http://code.google.com/p/snark/ and not in the repo pointed to in the link you've provided.
I've not used it, but a Google search showed up YAIRCC. Describes itself as "A lightweight Java Bittorrent library and client".
Transdroid and Transdroid-desktop are libraries for adroid, that can also be used in java to control existing torrent clients.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Does anyone know of a good online compiler/runtime (for C++, Java, Python, ObjC etc.) that I can access on the web?
What I'm looking for is something that would allow me to type in a program in a web form and to run the program and see the results online.
(Let's not get into the why for now. Suffice it to say for the moment that I don't always have access to a compiler/runtime, and firing up an IDE is just overkill for testing out some code snippets)
I know of codepad.org -- but I'm looking for something better.
ideone is something better but what particular advence do you need?
http://codepad.org/
codepad.org is an online
compiler/interpreter, and a simple
collaboration tool. Paste your code
below, and codepad will run it and
give you a short URL you can use to
share it in chat or email.
Languages:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
Right now, you can use http://sagenb.org. This is a free open source online Google Docs-like programming notebook environment, which I provide (thanks to a generous grant from the National Science Foundation). Once you create an account and create a new worksheet, click on the box (fourth from left) labeled "Sage" and change it to Python. Now all the code you type in is evaluated using Python. The main drawback is that there are well over 30,000 users of this resource, so sometimes it is slow.
I found this online java compiler and runner. It works in realtime and also with threads. Amazing !
http://www.browxy.com
For C++, you could try CodeControl, Comeau or the one from code.vcer.net.
This one is good for ruby.
Here is an open source one: http://codenode.org, which supports Python and Sage well, but also aims to support other languages like Ruby, R, etc. Probably the best description of Codenode is "Google docs combined with Mathematica Notebooks".
CodeIDE is an ok one: http://www.codeide.com/
You can practice your SQL here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Is there a tool out there that can automatically convert Python to Java?
Can Jython do this?
Actually, this may or may not be much help but you could write a script which created a Java class for each Python class, including method stubs, placing the Python implementation of the method inside the Javadoc
In fact, this is probably pretty easy to knock up in Python.
I worked for a company which undertook a port to Java of a huge Smalltalk (similar-ish to Python) system and this is exactly what they did. Filling in the methods was manual but invaluable, because it got you to really think about what was going on. I doubt that a brute-force method would result in nice code.
Here's another possibility: can you convert your Python to Jython more easily? Jython is just Python for the JVM. It may be possible to use a Java decompiler (e.g. JAD) to then convert the bytecode back into Java code (or you may just wish to run on a JVM). I'm not sure about this however, perhaps someone else would have a better idea.
It may not be an easy problem.
Determining how to map classes defined in Python into types in Java will be a big challange because of differences in each of type binding time. (duck typing vs. compile time binding).
Yes Jython does this, but it may or may not be what you want
to clarify your question:
From Python Source code to Java source code? (I don't think so)
.. or from Python source code to Java Bytecode? (Jython does this under the hood)