Skip to main content

Home/ SoftwareEngineering/ Group items tagged jvm

Rss Feed Group items tagged

kuni katsuya

FAQ How do I run Eclipse? - Eclipsepedia - 0 views

  • Find the JVM If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable
  • Eclipse DOES NOT consult the JAVA_HOME environment variable
  • eclipse.ini The most recommended way to specify a JVM for Eclipse to run in is to put startup configuration into the eclipse.ini file
  • ...3 more annotations...
  • To specify a JVM using configuration file, include the -vm argument in eclipse.ini, for example: -vm c:/jre/bin/javaw.exe
  • Note: there are no quotes around this path as would be required when executing the same from the command-line were the path to contain white space, etc. This is a common mistake when using Windows.
  • You should always use -vm so you can be sure of what VM you are using. Installers for other applications sometimes modify the system path variable, thus changing the VM used to launch Eclipse without your knowing about it.
  •  
    Find the JVM If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
kuni katsuya

Containers - Arquillian - Project Documentation Editor - 0 views

  • Arquillian recognizes three container interaction styles: A remote container resides in a separate JVM from the test runner. Arquillian binds to the container to deploy the test archive and invokes tests via a remote protocol (e.g., Servlet, JMX). A managed container is similar to a remote container, except its lifecycle (startup/shutdown) is also managed by Arquillian. An embedded container resides in the same JVM and is mostly likely managed by Arquillian. Tests are executed via a local protocol for containers without a web component and via a remote protocol for containers with a web component. No need to fiddle with those Maven plugins!
  • Arquillian can control a variety of containers out of the box
kuni katsuya

IRC FAQ - Eclipsepedia - 0 views

  • Where are Eclipse preferences stored?
  • Preferences are stored in various places (this applies to Eclipse 3.1)
  • for each installation (but this may vary for multi-user installations), in files stored in <eclipse_home>/eclipse/configuration/.settings/
  • ...18 more annotations...
  • for each workspace, in files stored in <workspace>/.metadata/.plugin/org.eclipse.core.runtime/.settings
  • for each project --for project-level settings -- in files stored in a .settings sub-directory of your project folder
  • Is there an UML editor for Eclipse? An Eclipse Modelling project-based UML editor can be installed from the Eclipse update site "Modelling > UML2 Tools SDK". See Creating UML 2 diagrams with Eclipse UML2 Tools - Tutorial for an introduction.
  • How do I debug Eclipse? How can I see what plug-ins are being started? Why aren't the plug-ins I installed showing up in the UI? How do I start the OSGi console?
  • Debugging OSGi Bundle Loading Issues There are a few flags you can pass to Eclipse on the commandline or in your eclipse.ini file that might help: -consolelog - log everything in workspace/.metadata/.log to the console where you launched Eclipse as well -debug - more verbose console output -console - start the Equinox OSGi console to interact with OSGi directly -noexit - when Eclipse closes, keep the OSGi console running until you type 'exit' or hit CTRL-C so you can keep debugging See Where Is My Bundle? for an overview of how to use the OSGi console for diagnosing problems.
  • Debugging Eclipse Using Eclipse You can also debug an Eclipse instance from another instance through remote debugging: Start the instance to be debugged with "-vmargs -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,address=8000". You should see a message like "Listening for transport dt_socket at address: 8000" Open Run → Debug Configurations... and create a Remote Java Application configuration with connection type "Socket Attach" and connecting to the client at port 8000. Set the project to a bundle project with the right dependencies for the bundles that you are trying to debug. Launch the configuration. The JDWP agent supports other useful arguments, like "suspend=n" so that the process does not suspend. For more details, see Oracle's Java Debug Wire Protocol (JDWP) connection docs.
  • I just installed Eclipse on my 64-bit system, but it does not start. What is the problem? Make sure that you have downloaded the 64-bit version of Eclipse (it should have x86_64 somewhere in its name) and have installed a 64-bit JVM. Likewise, if you run a 32-bit JVM, then you should use the 32-bit version of Eclipse.
  • When I start Eclipse it says "Workspace in use or cannot be created, choose a different one.", what should I do? There are a couple of things you can try. Delete the workspace/.metadata/.lock file. Check your running processes to make sure there aren't any remaining Java or Eclipse processes running. When in doubt, restart your computer. :) Try starting Eclipse on a different workspace (from the workspace selection dialog, or by using a command line argument like -data /home/user/tmp-workspace), then switch back to your original workspace.
  • How do I uninstall a plug-in? You can view your list of installed software by checking your installation details from about dialog. Help > About > Installation Details
  • I'm having memory, heap, or permgen problems, what can I do? FAQ How do I increase the heap size available to Eclipse? FAQ How do I increase the permgen size available to Eclipse?
  • Eclipse seems to be hanging on startup. How can I find out why? If none of the solutions outlined in this section reveal the problem, then you can try debugging an Eclipse instance as a debug target from another Eclipse instance. This is surprisingly easy: Start Eclipse in a "new" blank workspace (e.g., C:\TEMP\WS, or /tmp) Create a new Debug configuration: Run -> Debug Configurations; then click on "Eclipse Applications" and select the New Launch Configuration. If you believe it's something about a particular workspace, then set the workspace to your normal workspace. If you believe the hang is caused by a particular plugin, disable the plugin and verify. Launch and then see. Using this approach, you can break with the debugger to see where hangs are occurring. You can also change the selection of plugins that the instance is launched with.
  • I was working on a project and doing something or other does not work. Where should I start? Try refreshing your projects. Try cleaning your your projects using the menu item Project/Clean to trigger a rebuild. Try closing/reopening your projects. Try restarting Eclipse.
  • 4.2 Where are Eclipse's log files located?
  • Where are Eclipse's log files located? <workspace>/.metadata/.log You can view this workspace log as a view if you have PDE installed on your computer (which you would if you have downloaded the Eclipse SDK). You can open that view via Window -> Show View -> Other -> PDE Runtime -> Error Log. <eclipse install>/configuration/<sometimestamp>.log <eclipse install>/configuration/org.eclipse.update/install.log
  • Where are Eclipse preferences stored?
  • Where are Eclipse preferences stored?
  • Where are Eclipse preferences stored?
  • Where are update site bookmarks stored? It is within an XML file called <user_home>/.eclipse/org.eclipse.platform_3.1.2/configuration/org.eclipse.update/bookmarks.xml. Your Eclipse version may vary.
  •  
    Where are Eclipse preferences stored?
kuni katsuya

Why you should never use getSingleResult() in JPA | Sysout.be - 0 views

  • The only use for getSingleResult() is when we are
  • executing a scalar (count, sum, avg) query
  • query wich will
  • ...8 more annotations...
  • alway
  • return a row
  • 3 ways to do this
  • EntityManger.find()
  • returns a typed instance of the entity when it is found, null when it is not found
  • But what if the row isn’t in the database (anymore)?
  • We get an unchecked exception: NoResultException
  • We never know for sure what we can expect from our database, so throwing an unchecked exception seems the wrong choice for this use-case
    • kuni katsuya
       
      thinking defensively, in a pathological scenario, the data and/or schema of the database could be corrupt eg. using a named query that should return a single entity based on a unique constraint of a table: - what if the unique constraint was implemented incorrectly in the ddl? (too relaxed or too strict) - what if the data became inconsistent as a result of some external process? => should always code defensively, especially at integration points to anything external to the jvm 
kuni katsuya

In Relation To...  Bean Validation for Flex developers - 0 views

  • Bean Validation for Flex developers
  • GraniteDS have added support for Bean Validation into their project and hence Bean Validation is usable by all Flex users
  • Because they do not run on the JVM, they basically have reimplemented the full specification in Flex: you can annotate your ActionScript3 objects with constraints: it supports all the standard constraints and you can write your own constraints you can execute the validation logic and retrieve the error report you can make use of most of the feature including advanced ones like groups, group sequence etc
  • ...3 more annotations...
  • for GraniteDS users keeping their Java domain model and ActionScript3 domain model in sync via Gas3, the constraints are kept in sync
  • a couple of gotchas to be aware of
  • the constraint implementation is in the same class as the constraint declaration (not a problem in a dynamic language) @Pattern has a sightly different semantic because the regexp engine in Flex is a bit different. instead of the features provided by ConstraintValidatorContext, you can define a properties attribute in your constraints to make it belong to several sub-properties. not as flexible but good enough in many cases.
kuni katsuya

java - Flex+JPA/Hibernate+BlazeDS+MySQL how to debug this monster? - Stack Overflow - 0 views

  • Set break points in my Java code Start up the Java application server with the appropriate debug JVM properties set (e.g. -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n) From Eclipse, I attach a remote debugger to the app server on the default port 8000. The Java Debugger will open up when a break point is hit. Set breakpoints in my Flex application (or one of its modules). From Eclipse (with Flash Builder) I launch a debug configuration for my Flex app. The Flex Debugger will open up when a break point is hit. At this point I have two debuggers open and everything work great. Two other things I do: a) extend the transaction system timeout, so it doesn't get trigger while I am sitting there think for a few minutes b) use Charles Proxy (in reverse proxy mode) inbetween the client and server to watch the AMF traffic and view payloads, etc.
  • Flex+JPA/Hibernate+BlazeDS+MySQL how to debug this monster?
1 - 11 of 11
Showing 20 items per page