Author: mturk Date: Fri Aug 21 16:37:52 2009 New Revision: 806634 URL: http://svn.apache.org/viewvc?rev=806634&view=rev Log: Add the Main class
Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java (with props) Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java?rev=806634&view=auto ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java (added) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java Fri Aug 21 16:37:52 2009 @@ -0,0 +1,60 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.runtime; + +import org.apache.commons.runtime.exception.*; + +/** + * Main class. + * + * @since Runtime 1.0 + * + */ +public final class Main +{ + + private Main() + { + // No instance. + } + + /** + * Dummy main(). + * <p> + * This class is present only for testing purposes for the moment. + * In the future it will be used for launching other Java classes + * from detached JVM. + * </> + */ + public static void main(String args[]) + { + try { + System.loadLibrary("acr"); + boolean inited = Native.initialize(); + if (inited) { + System.out.println("Initialized Apache Commons Runtime : " + + Version.MAJOR + "." + Version.MINOR + "." + + Version.PATCH + " (" + Version.BUILDMARK + ") " + "for " + + Os.getSysname() + "/" + Os.getMachine()); + } + } catch (Throwable ex) { + ex.printStackTrace(); + } + } + +} + Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java ------------------------------------------------------------------------------ svn:eol-style = native