Все вопросы: [jvm]

298 вопросов

28
голосов
4ответов
6348 просмотров

Is Clojure object-oriented at its heart? (Polymorphism in seqs)

Clojure is a functional lisp, reportedly not at all object-oriented, even though it runs on the JVM, a VM designed for an object oriented language. Clojure provides identical interfaces for iterating over lists and vectors by abstracting them to an interface called seq. This is even implemented...

12
голосов
8ответов
6681 просмотров

Disabling compile-time dependency checking when compiling Java classes

Consider the following two Java classes: a.) class Test { void foo(Object foobar) { } } b.) class Test { void foo(pkg.not.in.classpath.FooBar foobar) { } } Furthermore, assume that pkg.not.in.classpath.FooBar is not found in the classpath. The first class will compile fine using the standard...

18
голосов
4ответов
6274 просмотров

OCaml for JVM. Is there any?

I took a look at some new languages for JVM. Two of them are gathering much interest these days: Clojure and Scala. But in my humble opinion, both of them are not ideal. (Let's keep it a speculation, cause I don't want to damage myself discussing..) What I actually see as a tricky move is MS's i...

1
голосов
1ответов
673 просмотров

Controlling compiler options in Eclipse

Is there a way to control the optimization level of the java compiler that Eclipse uses when building a project? Or is this question not relevant anymore, is all optimization deferred to the vm? The reason I'm asking is that I recently wrote a quick test doing this: private static int test_f(in...

5
голосов
4ответов
4061 просмотров

Obtaining a list of all classes used while running a Java application?

What is the easiest way to obtain a list of all classes used while running a Java application? Assume that com.package.Foo.main is invoked by running: java com.package.Foo After running the program I'd like to have a list of all classes that have been used while running the program: cat clas...

46
голосов
2ответов
32509 просмотров

Read Java JVM startup parameters (eg -Xmx)

I'm trying to figure out if there's a way to determine the JVM startup properties from within a running java process. Specifically I'm trying to find out where parameters such as -Xmx (max heap size) and -XX:MaxPermSize are stored. I'm running Sun's 1.6 jvm. If you're wondering why I want to d...

52
голосов
5ответов
147062 просмотров

Eclipse: stop code from running (java)

Sometimes, I'll run a program that accidentally contains an infinite loop or something. Eclipse will let me continue editing the program, but be super slow. How can I stop it? (Do I want to restart the JVM?) Restarting eclipse itself always works, but that breaks my workflow.

0
голосов
3ответов
1151 просмотров

Mismatching JVM versions in deploying web-app between Eclipse and Tomcat

I have a web-app, built and compiled in Eclipse, which I want to deploy to my Tomcat 6 (I want to do it manually) and I get a UnsupportedClassVersionError exception which means the JVM tomcat is running is older than the one my eclipse is running. After some checking I see that in the tomcat mana...

0
голосов
1ответов
1080 просмотров

JVM crash on opening a "return" SocketChannel

Was working my ... off on a handin project this evening, and suddenly the JVM started crashing on me. I've been able to create a simple program that can reproduce the crash, and have submitted it to Sun, but I wondered if anyone in here could take a look at the program, and tell me if I'm doing s...

82
голосов
8ответов
29960 просмотров

On Performance and Java Interoperability: Clojure vs. Scala

I have already read various accounts of Clojure vs. Scala and while I realize that both have their place. There are a few considerations that I haven't acquired a complete explanation on when it comes to comparing both Clojure with Scala: 1.) Which of the two languages is generally faster? I r...

2
голосов
1ответов
186 просмотров

Does Sun's HotSpot have Objects Inlining optimization?

I read somewhere that there is such optimization as Objects Inlining. It collocates two objects together if they have the same life-time scopes and there is a lot of reads between them. And GC also treat them as one to move from one generation to another. But I didn't find any mention about thi...

68
голосов
2ответов
10163 просмотров

What is the point of invokeinterface?

I'm reading this article about how JVM invokes methods, and I think I got most of it. However, I'm still having trouble understanding the need for invokeinterface. The way I understand it, a class basically has a virtual table of methods and when calling a method with either invokevirtual or inv...

82
голосов
7ответов
18302 просмотров

How to see JIT-compiled code in JVM?

Is there some way to see the native code produces by the JIT in a JVM?

2
голосов
4ответов
1646 просмотров

Switching between bytecode versions for a Java class file

Given a Java class file (ClassName.class) with bytecode version X is there a general way to convert this class file from being represented in bytecode version X to being represented in bytecode version Y? Assumptions: The source code is not available. The class file is the only available repre...

15
голосов
4ответов
5783 просмотров

Invalid access of stack red zone from Java VM

I'm trying to figure out what can cause this error in Java: Invalid access of stack red zone 0x115ee0ed0 rip=0x114973900 Has anyone ever encountered this error message? It's literally killing the JVM and everything stops there. I'm currently using this version of Java:(on OS X 10.6) java ve...

4
голосов
3ответов
232 просмотров

Updates to the JVM Specification

JVM Spec 2nd Edition is dated by 1999. Which important updates since then (like dynamicinvoke) should I consider to learn? This is in course to understand internals of the modern JVM implementations (HotSpot particularly).

1
голосов
1ответов
182 просмотров

Can you run Jython on the JVM that runs on Pulse smart pens?

I'm looking at developing an application that takes advantage of the Pulse smart pen. I would rather do it in python than java. Its not clear what version of the jvm runs on the pen, as evidence here in the tech specs Are there limitations on whether or not jython and jruby will run on mobile v...

162
голосов
5ответов
157248 просмотров

How to get VM arguments from inside of Java application?

I need to check if some option that can be passed to JVM is explicitly set or has its default value. To be more specific: I need to create one specific thread with higher native stack size than the default one, but in case the user wants to take care of such things by himself by specifying the -...

3
голосов
8ответов
643 просмотров

How should I tackle with "Program Crashing" issues?

I am working on a Java product. An client claims that the application is getting crashed after an arbitrary time. SInce it is a crash we can't find any information on our logs. Are there any tools, methods to find out the reasons for such Issues? Can we do anything in code side to get more info...

6
голосов
2ответов
1805 просмотров

Restrictions on what an unsigned Java applet can do?

I'm trying to compile a complete list of all restrictions placed on unsigned Java applets (defined as things a normal Java application can do, but an unsigned Java applet cannot). This is the list I've compiled so far: An unsigned Java applet ... Cannot access the local filesystem. Cannot a...

24
голосов
2ответов
4575 просмотров

Java Expression Trees

Is there an equivalent of .net's Expression Trees that underly LINQ for the JVM? I would like to implement some LINQ like code structures in Scala and I am wondering if I have to roll my own expression tree library also. Update: I am not interested in a linq equivalent itself. .net has a large s...

6
голосов
3ответов
3100 просмотров

Is Java bytecode compatible within different updates of the same version of Java?

this question is related to the the other topic discussed here: Is Java bytecode compatible with different versions of Java? but in this case would like to know whether compatibility is preserved within the same version but on different updates. For example, is bytecode generate by the compiler o...

2
голосов
2ответов
1913 просмотров

what is Sun VM's equivalent option to IBM VM's -Xcheck:jni:alwayscopy?

what is Sun VM's equivalent option to IBM VM's -Xcheck:jni:alwayscopy ?

25
голосов
3ответов
69968 просмотров

Passing environment variables to a JVM, in a platform-independent manner

I'm developing a J2EE application that runs in JBoss on a Windows Vista machine, but the application will end up on a Linux machine. Is there a way to pass in the value of an environment variable in a platform independent way? I think (but I'm not sure) the platform-sensitive way would be: -Den...

39
голосов
3ответов
27112 просмотров

Is there a good GnuPG encryption library for Java/Scala?

I would like to be able to encrypt files on disk and/or data in memory using GnuPG from a Java application. If possible I'd like to avoid having to make system calls out to the GPG command line tools. Is there a recommended library, or can you recommend the best approach to GPG encrypting from ...

4
голосов
5ответов
629 просмотров

I have never seen a software be released as jar, so how can I make a software be released as exe too?

Is everybody thinking that everybody else doesn't release softwares as jar and then releases softwares as exe too?

41
голосов
5ответов
18996 просмотров

PermGen problems with Lift and Jetty

I'm developing on the standard Lift platform (maven and jetty). I'm repeatedly (once every couple of days) getting this: Exception in thread "[email protected]" java.lang.OutOfMemoryError: PermGen space 2009-09-15 19:41:38.629::WARN: handle failed java.lang.OutOfMemoryError: PermGen space ...

3
голосов
5ответов
934 просмотров

Fail-safe way of round-tripping JVM byte-code to text-representation and back

I'm looking for a fail-safe way to round-trip between a JVM class file and a text representation and back again. One strict requirement is that the resulting round-tripped JVM class file is exactly functionally equivalent to the original JVM class file as long as the text representation is left ...

6
голосов
3ответов
4829 просмотров

JVM throws OutOfMemory during gc though there are plenty memory left

I have my java application configured to use 5G memory. I got an OutOfMemory out of blue. I inspected the gc log and found plenty of memory left: young generation occupies 4% allocated space, tenure generation occupancy is 5% and perm generation is 43%. I am puzzled why JVM throws an OutOfMemory ...

11
голосов
1ответов
7528 просмотров

What impact, if any, does the -d64 switch have on Sun JVM resident memory usage?

I've got this webapp that needs some memory tuning. While I'm already profiling the application itself and trimming things down, the JVM itself seems overly bloated to me on our busiest instance. (The lower volume instances do not have this problem.) The details: Platform: RHEL4 64-bit (Li...