Perl's thaw() implementation in Java [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have two applications running concurrently: one in Perl, and one in Java. The Perl app relies on using nfreeze to store objects in the database. If my Java app has access to that database, how can I "thaw" that object inside of the Java application?
I don't need to be able to write to that object, just read it and use it in the Java app.

Storable is specifically designed for Perl data structures. It hasn't been ported to other languages.
Instead of (or in addition to) using Storable, use XML, JSON or YAML (in no particular order).
It's that's not possible, your Java program is going to have to call a Perl script to translate the data into something more convenient.

Related

What is the best method to add a chat feature to a website using Java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am currently a relatively new in the field of programming, and I am helping with a friend of mine on building a social network. It is already live picxter.com. However we are looking on implementing a chat feature for our users and the owner told me I should use a Java applet as it would be best suited for our needs. However is this possible? We are not trying to make a chat site type of chat. We are trying to build a chat like Facebook.
Don't use Java for these sorts of applications! Using Java in your browser is not a very good idea in general. You could try to do it in JavaScript using AJAX (which is syntactically very similar to Java and by far not as slow, doesn't require a runtime environment and isn't as risky [you can argue about that, to be honest] in terms of security).

Can I run java code in html textbox? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I am writing one web page in which I am putting one html input type="textarea" in which user will write their java code and on submit it will return output of that java code. Can I do this using jsp? if not then what are the other ways.
I would think very carefully before allowing people to do that.
At the very least, to read and run the user's input, you will need a JDK to compile it, and a JVM to run it. Since you're talking about over the web, presumably the user's machine will not have those (otherwise they'd just use theirs), so you'd have to use the ones on your server - that is, take the user's text, upload it as a .java file to your server, compile and run it (for an anonymous user on your server!), and send the result back to the browser session.
As you can see, there are a couple of pretty big, bad security problems here. Not recommended !

How to create pdf file using Java without using any external libraries? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is there a way to create a PDF file without using a third-party library, like iText, Apache PDFBox, PDFJet and so on ?
If you really want to do this, download a copy of the PDF specification, and read it. (It is only 978 pages ... it won't take that long to read ...) Then design and implement a program that generates a byte stream that conforms to the specified format and contains the information you want to output with a suitable layout, etcetera.
You could probably produce a simple "hello world" document in a week or three. But my estimate is that it would take you years (and many versions) to get to the level of sophistication of one of the existing libraries.
A better idea is to not waste your time reinventing the wheel.

How to read/write from/to a drive directly using Win32 API [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Without having to write a low-level Windows driver, but still using either Java or some C-based API, is it possible to read/write from/to a raw, unpartitioned drive... one that has got no file-system on it?
A short sample program would help. If not, at least knowing what standard Windows/Java (or, 3rd Party) API I could use in userspace (without having to write a device driver) would help.
It is possible to access a raw disk using the CreateFile() function by passing
"\\.\PhysicalDriveX"
as name.
Where X is a 0-based index counting the drives.

How to call python code from outside of Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am trying to call python method from my java file.
mypython.py
def ab():
print "i am calling"
myjava.class
public void call()
{
ab() // just want to call python method
}
I don't have any idea to do this.
When I search on google for this all info will say about jython.
and I am not using jython.
if it is possible to do without jython.
or what is the best way to call my python code in java.
You could use Thrift for example. You'd write a Python server and use a Java client to access it. Here's an example Java server & client and an example Python server & client. There's also a consistent example on the front page, which uses a C++ server and a Python client.
The basic idea is that you define the interfaces using the Thrift IDL, and it then generates language specific code for you. Thrift will deal with the remote procedure call for you.
It is not possible to call Python method in java code. You can do it only with C or C++.

Categories

Resources