提交 fad19847 编写于 作者: A asaha

Merge

......@@ -447,5 +447,6 @@ a006fa0a9e8f18dee6daf8984bd11625c4c4860c jdk8u60-b15
c30db4c968f63dce1bf2f9df240fb75a8f27f922 jdk8u60-b17
57336c319de8a141d0bcd04265ce36734fb51380 jdk8u60-b18
b2c55ff77112321472ec97c3a6931a999837d183 jdk8u60-b19
cc6c74b164dfd0636d9dba8f9865baa18a6f2338 jdk8u60-b20
286b9a885fcc6245fdf2b20697473ec3b35f2538 jdk8u65-b00
80a796d0db958f49a4b0713818227eda8e5efbb9 jdk8u65-b01
......@@ -384,7 +384,7 @@ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/32bit, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/32bit, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/32))
$(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
......@@ -393,7 +393,7 @@ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/legacy, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/legacy, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/legacy))
$(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
......@@ -404,7 +404,7 @@ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/64bit, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/64bit, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/64))
$(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
......
......@@ -134,7 +134,8 @@ endif
define SetupAccessBridge
# Parameter 1 Suffix
# Parameter 2 Machine
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix and name of directory where gensrc headers
# are found.
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \
LIBRARY = JAWTAccessBridge$1, \
......@@ -144,7 +145,8 @@ endif
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
......@@ -170,7 +172,8 @@ endif
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3, \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
......@@ -194,7 +197,8 @@ endif
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$3, \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
......@@ -215,7 +219,7 @@ endif
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupAccessBridge,-32,I386,32))
$(eval $(call SetupAccessBridge,,I386,LEGACY))
$(eval $(call SetupAccessBridge,,I386,legacy))
else
$(eval $(call SetupAccessBridge,-64,X64,64))
endif
......
......@@ -42,7 +42,7 @@ SUNWprivate_1.1 {
Java_java_net_Inet4Address_init;
Java_java_net_Inet6Address_init;
Java_java_net_PlainDatagramSocketImpl_setTTL;
Java_java_net_PlainDatagramSocketImpl_socketSetOption;
Java_java_net_PlainDatagramSocketImpl_socketSetOption0;
Java_java_net_PlainDatagramSocketImpl_bind0;
Java_java_net_PlainSocketImpl_socketAccept;
Java_java_net_DatagramPacket_init;
......@@ -73,7 +73,7 @@ SUNWprivate_1.1 {
Java_java_net_SocketOutputStream_init;
Java_java_net_PlainDatagramSocketImpl_peek;
Java_java_net_PlainDatagramSocketImpl_peekData;
Java_java_net_PlainSocketImpl_socketSetOption;
Java_java_net_PlainSocketImpl_socketSetOption0;
Java_java_net_PlainSocketImpl_socketSendUrgentData;
Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate;
Java_java_net_PlainSocketImpl_socketGetOption;
......
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -124,7 +124,7 @@ PrintingDialog.contentInitial.textAndMnemonic=Utskrift p\u00E5g\u00E5r...
# The following string will be formatted by a MessageFormat
# and {0} will be replaced by page number being printed
PrintingDialog.contentProgress.textAndMnemonic=Utskriven sida {0}...
PrintingDialog.contentProgress.textAndMnemonic=Skriver ut sida {0}...
PrintingDialog.contentAborting.textAndMnemonic=Utskriften avbryts...
......@@ -172,7 +172,7 @@ ComboBox.togglePopup.textAndMnemonic=v\u00E4xlaPopup
ProgressMonitor.progress.textAndMnemonic=P\u00E5g\u00E5r...
############ Split Pane Strings ############
SplitPane.leftButton.textAndMnemonic=v\u00E4nster knapp
SplitPane.leftButton.textAndMnemonic=v\u00E4nsterknapp
SplitPane.rightButton.textAndMnemonic=h\u00F6ger knapp
# Used for Isindex
IsindexView.prompt=Detta \u00E4r ett s\u00F6kbart index. Ange s\u00F6kord:
......
......@@ -77,14 +77,72 @@ public final class CFont extends PhysicalFont {
}
private static native long createNativeFont(final String nativeFontName,
final int style,
final boolean isFakeItalic);
final int style);
private static native void disposeNativeFont(final long nativeFontPtr);
private boolean isFakeItalic;
private String nativeFontName;
private long nativeFontPtr;
private native float getWidthNative(final long nativeFontPtr);
private native float getWeightNative(final long nativeFontPtr);
private int fontWidth = -1;
private int fontWeight = -1;
@Override
public int getWidth() {
if (fontWidth == -1) {
// Apple use a range of -1 -> +1, where 0.0 is normal
// OpenType uses a % range from 50% -> 200% where 100% is normal
// and maps these onto the integer values 1->9.
// Since that is what Font2D.getWidth() expects, remap to that.
float fw = getWidthNative(getNativeFontPtr());
if (fw == 0.0) { // short cut the common case
fontWidth = Font2D.FWIDTH_NORMAL;
return fontWidth;
}
fw += 1.0; fw *= 100.0;
if (fw <= 50.0) {
fontWidth = 1;
} else if (fw <= 62.5) {
fontWidth = 2;
} else if (fw <= 75.0) {
fontWidth = 3;
} else if (fw <= 87.5) {
fontWidth = 4;
} else if (fw <= 100.0) {
fontWidth = 5;
} else if (fw <= 112.5) {
fontWidth = 6;
} else if (fw <= 125.0) {
fontWidth = 7;
} else if (fw <= 150.0) {
fontWidth = 8;
} else {
fontWidth = 9;
}
}
return fontWidth;
}
@Override
public int getWeight() {
if (fontWeight == -1) {
// Apple use a range of -1 -> +1, where 0 is medium/regular
// Map this on to the OpenType range of 100->900 where
// 500 is medium/regular.
// We'll actually map to 0->1000 but that's close enough.
float fw = getWeightNative(getNativeFontPtr());
if (fw == 0) {
return Font2D.FWEIGHT_NORMAL;
}
fw += 1.0; fw *= 500;
fontWeight = (int)fw;
}
return fontWeight;
}
// this constructor is called from CFontWrapper.m
public CFont(String name) {
this(name, name);
......@@ -94,10 +152,11 @@ public final class CFont extends PhysicalFont {
handle = new Font2DHandle(this);
fullName = name;
familyName = inFamilyName;
nativeFontName = inFamilyName;
nativeFontName = fullName;
setStyle();
}
/* Called from CFontManager too */
public CFont(CFont other, String logicalFamilyName) {
handle = new Font2DHandle(this);
fullName = logicalFamilyName;
......@@ -109,6 +168,7 @@ public final class CFont extends PhysicalFont {
public CFont createItalicVariant() {
CFont font = new CFont(this, familyName);
font.nativeFontName = fullName;
font.fullName =
fullName + (style == Font.BOLD ? "" : "-") + "Italic-Derived";
font.style |= Font.ITALIC;
......@@ -118,7 +178,7 @@ public final class CFont extends PhysicalFont {
protected synchronized long getNativeFontPtr() {
if (nativeFontPtr == 0L) {
nativeFontPtr = createNativeFont(nativeFontName, style, isFakeItalic);
nativeFontPtr = createNativeFont(nativeFontName, style);
}
return nativeFontPtr;
}
......
......@@ -252,13 +252,42 @@ public final class CFontManager extends SunFontManager {
final CFont font = new CFont(fontName, fontFamilyName);
registerGenericFont(font);
}
if ((font.getStyle() & Font.ITALIC) == 0) {
registerGenericFont(font.createItalicVariant(), true);
void registerItalicDerived() {
FontFamily[] famArr = FontFamily.getAllFontFamilies();
for (int i=0; i<famArr.length; i++) {
FontFamily family = famArr[i];
Font2D f2dPlain = family.getFont(Font.PLAIN);
if (f2dPlain != null && !(f2dPlain instanceof CFont)) continue;
Font2D f2dBold = family.getFont(Font.BOLD);
if (f2dBold != null && !(f2dBold instanceof CFont)) continue;
Font2D f2dItalic = family.getFont(Font.ITALIC);
if (f2dItalic != null && !(f2dItalic instanceof CFont)) continue;
Font2D f2dBoldItalic = family.getFont(Font.BOLD|Font.ITALIC);
if (f2dBoldItalic != null && !(f2dBoldItalic instanceof CFont)) continue;
CFont plain = (CFont)f2dPlain;
CFont bold = (CFont)f2dBold;
CFont italic = (CFont)f2dItalic;
CFont boldItalic = (CFont)f2dBoldItalic;
if (bold == null) bold = plain;
if (plain == null && bold == null) continue;
if (italic != null && boldItalic != null) continue;
if (plain != null && italic == null) {
registerGenericFont(plain.createItalicVariant(), true);
}
if (bold != null && boldItalic == null) {
registerGenericFont(bold.createItalicVariant(), true);
}
}
}
Object waitForFontsToBeLoaded = new Object();
private boolean loadedAllFonts = false;
public void loadFonts()
{
synchronized(waitForFontsToBeLoaded)
......@@ -267,7 +296,11 @@ public final class CFontManager extends SunFontManager {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Object>() {
public Object run() {
loadNativeFonts();
if (!loadedAllFonts) {
loadNativeFonts();
registerItalicDerived();
loadedAllFonts = true;
}
return null;
}
}
......
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,6 @@
* questions.
*/
package sun.lwawt;
import java.awt.Component;
......@@ -40,7 +39,6 @@ import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;
import javax.swing.text.Document;
import javax.swing.text.JTextComponent;
/**
* Lightweight implementation of {@link TextAreaPeer}. Delegates most of the
......@@ -75,12 +73,13 @@ final class LWTextAreaPeer
super.initializeImpl();
final int visibility = getTarget().getScrollbarVisibility();
synchronized (getDelegateLock()) {
getTextComponent().setWrapStyleWord(true);
setScrollBarVisibility(visibility);
}
}
@Override
JTextComponent getTextComponent() {
JTextArea getTextComponent() {
return getDelegate().getView();
}
......@@ -165,7 +164,7 @@ final class LWTextAreaPeer
// JTextArea.replaceRange() is called.
final Document document = getTextComponent().getDocument();
document.removeDocumentListener(this);
getDelegate().getView().replaceRange(text, start, end);
getTextComponent().replaceRange(text, start, end);
revalidate();
postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
document.addDocumentListener(this);
......
......@@ -366,8 +366,7 @@ public final class LWCToolkit extends LWToolkit {
protected void initializeDesktopProperties() {
super.initializeDesktopProperties();
Map <Object, Object> fontHints = new HashMap<>();
fontHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
fontHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
fontHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
desktopProperties.put(SunToolkit.DESKTOPFONTHINTS, fontHints);
desktopProperties.put("awt.mouse.numButtons", BUTTONS);
......
......@@ -23,6 +23,7 @@
* questions.
*/
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "sun_lwawt_macosx_CFRetainedResource.h"
......@@ -37,7 +38,10 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease
(JNIEnv *env, jclass clazz, jlong ptr, jboolean releaseOnAppKitThread)
{
if (releaseOnAppKitThread) {
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
// Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited
[NSApp postRunnableEvent:^(){
CFRelease(jlong_to_ptr(ptr));
}];
} else {
......
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -124,61 +124,6 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT(env);
}
static JNF_CLASS_CACHE(jc_Component, "java/awt/Component");
static JNF_MEMBER_CACHE(jf_Component_appContext, jc_Component, "appContext", "Lsun/awt/AppContext;");
static JNF_CLASS_CACHE(jc_MenuComponent, "java/awt/MenuComponent");
static JNF_MEMBER_CACHE(jf_MenuComponent_appContext, jc_MenuComponent, "appContext", "Lsun/awt/AppContext;");
/*
* Class: sun_awt_SunToolkit
* Method: getAppContext
* Signature: (Ljava/awt/Object;)Lsun/awt/AppContext;
*/
JNIEXPORT jobject JNICALL
Java_sun_awt_SunToolkit_getAppContext
(JNIEnv *env, jclass cls, jobject obj)
{
jobject appContext = NULL;
JNF_COCOA_ENTER(env);
if (JNFIsInstanceOf(env, obj, &jc_Component)) {
appContext = JNFGetObjectField(env, obj, jf_Component_appContext);
} else if (JNFIsInstanceOf(env, obj, &jc_MenuComponent)) {
appContext = JNFGetObjectField(env, obj, jf_MenuComponent_appContext);
}
JNF_COCOA_EXIT(env);
return appContext;
}
/*
* Class: sun_awt_SunToolkit
* Method: setAppContext
* Signature: (Ljava/lang/Object;Lsun/awt/AppContext;)Z
*/
JNIEXPORT jboolean JNICALL
Java_sun_awt_SunToolkit_setAppContext
(JNIEnv *env, jclass cls, jobject obj, jobject appContext)
{
jboolean isComponent;
JNF_COCOA_ENTER(env);
if (JNFIsInstanceOf(env, obj, &jc_Component)) {
JNFSetObjectField(env, obj, jf_Component_appContext, appContext);
isComponent = JNI_TRUE;
} else if (JNFIsInstanceOf(env, obj, &jc_MenuComponent)) {
JNFSetObjectField(env, obj, jf_MenuComponent_appContext, appContext);
isComponent = JNI_FALSE;
}
JNF_COCOA_EXIT(env);
return isComponent;
}
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: beep
......@@ -339,8 +284,10 @@ JNF_COCOA_ENTER(env);
beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.010]];
if (processEvents) {
//We do not spin a runloop here as date is nil, so does not matter which mode to use
// Processing all events excluding NSApplicationDefined which need to be processed
// on the main loop only (those events are intended for disposing resources)
NSEvent *event;
if ((event = [NSApp nextEventMatchingMask:NSAnyEventMask
if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefined)
untilDate:nil
inMode:NSDefaultRunLoopMode
dequeue:YES]) != nil) {
......
......@@ -35,15 +35,11 @@
#import "AWTStrike.h"
#import "CoreTextSupport.h"
#define DEBUG
@implementation AWTFont
- (id) initWithFont:(NSFont *)font isFakeItalic:(BOOL)isFakeItalic {
- (id) initWithFont:(NSFont *)font {
self = [super init];
if (self) {
fIsFakeItalic = isFakeItalic;
fFont = [font retain];
fNativeCGFont = CTFontCopyGraphicsFont((CTFontRef)font, NULL);
}
......@@ -72,7 +68,6 @@
+ (AWTFont *) awtFontForName:(NSString *)name
style:(int)style
isFakeItalic:(BOOL)isFakeItalic
{
// create font with family & size
NSFont *nsFont = [NSFont fontWithName:name size:1.0];
......@@ -95,7 +90,7 @@
nsFont = [[NSFontManager sharedFontManager] convertFont:nsFont toHaveTrait:NSBoldFontMask];
}
return [[[AWTFont alloc] initWithFont:nsFont isFakeItalic:isFakeItalic] autorelease];
return [[[AWTFont alloc] initWithFont:nsFont] autorelease];
}
+ (NSFont *) nsFontForJavaFont:(jobject)javaFont env:(JNIEnv *)env {
......@@ -354,7 +349,7 @@ JNF_COCOA_EXIT(env);
JNIEXPORT jlong JNICALL
Java_sun_font_CFont_createNativeFont
(JNIEnv *env, jclass clazz,
jstring nativeFontName, jint style, jboolean isFakeItalic)
jstring nativeFontName, jint style)
{
AWTFont *awtFont = nil;
......@@ -362,8 +357,7 @@ JNF_COCOA_ENTER(env);
awtFont =
[AWTFont awtFontForName:JNFJavaToNSString(env, nativeFontName)
style:style
isFakeItalic:isFakeItalic]; // autoreleased
style:style]; // autoreleased
if (awtFont) {
CFRetain(awtFont); // GC
......@@ -374,6 +368,52 @@ JNF_COCOA_EXIT(env);
return ptr_to_jlong(awtFont);
}
/*
* Class: sun_font_CFont
* Method: getWidthNative
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL
Java_sun_font_CFont_getWidthNative
(JNIEnv *env, jobject cfont, jlong awtFontPtr)
{
float widthVal;
JNF_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
NSFont* nsFont = awtFont->fFont;
NSFontDescriptor *fontDescriptor = nsFont.fontDescriptor;
NSDictionary *fontTraits = [fontDescriptor objectForKey : NSFontTraitsAttribute];
NSNumber *width = [fontTraits objectForKey : NSFontWidthTrait];
widthVal = (float)[width floatValue];
JNF_COCOA_EXIT(env);
return (jfloat)widthVal;
}
/*
* Class: sun_font_CFont
* Method: getWeightNative
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL
Java_sun_font_CFont_getWeightNative
(JNIEnv *env, jobject cfont, jlong awtFontPtr)
{
float weightVal;
JNF_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
NSFont* nsFont = awtFont->fFont;
NSFontDescriptor *fontDescriptor = nsFont.fontDescriptor;
NSDictionary *fontTraits = [fontDescriptor objectForKey : NSFontTraitsAttribute];
NSNumber *weight = [fontTraits objectForKey : NSFontWeightTrait];
weightVal = (float)[weight floatValue];
JNF_COCOA_EXIT(env);
return (jfloat)weightVal;
}
/*
* Class: sun_font_CFont
* Method: disposeNativeFont
......
......@@ -311,21 +311,26 @@ JNF_COCOA_ENTER(env);
jlong *glyphInfos =
(*env)->GetPrimitiveArrayCritical(env, glyphInfoLongArray, NULL);
if (glyphInfos != NULL) {
jint *rawGlyphCodes =
(*env)->GetPrimitiveArrayCritical(env, glyphCodes, NULL);
jint *rawGlyphCodes =
(*env)->GetPrimitiveArrayCritical(env, glyphCodes, NULL);
@try {
if (rawGlyphCodes != NULL && glyphInfos != NULL) {
CGGlyphImages_GetGlyphImagePtrs(glyphInfos, awtStrike,
rawGlyphCodes, len);
}
}
@finally {
if (rawGlyphCodes != NULL) {
CGGlyphImages_GetGlyphImagePtrs(glyphInfos, awtStrike,
rawGlyphCodes, len);
(*env)->ReleasePrimitiveArrayCritical(env, glyphCodes,
rawGlyphCodes, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, glyphCodes,
rawGlyphCodes, JNI_ABORT);
}
if (glyphInfos != NULL) {
// Do not use JNI_COMMIT, as that will not free the buffer copy
// when +ProtectJavaHeap is on.
(*env)->ReleasePrimitiveArrayCritical(env, glyphInfoLongArray,
glyphInfos, 0);
}
// Do not use JNI_COMMIT, as that will not free the buffer copy
// when +ProtectJavaHeap is on.
(*env)->ReleasePrimitiveArrayCritical(env, glyphInfoLongArray,
glyphInfos, 0);
}
JNF_COCOA_EXIT(env);
......
......@@ -195,19 +195,41 @@ DUMP_GLYPHINFO(const GlyphInfo *info)
#pragma mark --- Font Rendering Mode Descriptors ---
static Int32 reverseGamma = 0;
static UInt8 reverseGammaLut[256] = { 0 };
static inline UInt8* getReverseGammaLut() {
if (reverseGamma == 0) {
// initialize gamma lut
double gamma;
int i;
const char* pGammaEnv = getenv("J2D_LCD_REVERSE_GAMMA");
if (pGammaEnv != NULL) {
reverseGamma = atol(pGammaEnv);
}
if (reverseGamma < 100 || reverseGamma > 250) {
reverseGamma = 180;
}
gamma = 100.0 / reverseGamma;
for (i = 0; i < 256; i++) {
double x = ((double)i) / 255.0;
reverseGammaLut[i] = (UInt8)(255 * pow(x, gamma));
}
}
return reverseGammaLut;
}
static inline void
CGGI_CopyARGBPixelToRGBPixel(const UInt32 p, UInt8 *dst)
{
#if __LITTLE_ENDIAN__
*(dst + 2) = 0xFF - (p >> 24 & 0xFF);
*(dst + 1) = 0xFF - (p >> 16 & 0xFF);
*(dst) = 0xFF - (p >> 8 & 0xFF);
#else
*(dst) = 0xFF - (p >> 16 & 0xFF);
*(dst + 1) = 0xFF - (p >> 8 & 0xFF);
*(dst + 2) = 0xFF - (p & 0xFF);
#endif
UInt8* lut = getReverseGammaLut();
*(dst + 0) = lut[0xFF - (p >> 16 & 0xFF)]; // red
*(dst + 1) = lut[0xFF - (p >> 8 & 0xFF)]; // green
*(dst + 2) = lut[0xFF - (p & 0xFF)]; // blue
}
static void
......@@ -222,17 +244,14 @@ CGGI_CopyImageFromCanvasToRGBInfo(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
size_t height = info->height;
size_t y;
// fill empty glyph image with black-on-white glyph
for (y = 0; y < height; y++) {
size_t destRow = y * destRowWidth * 3;
size_t srcRow = y * srcRowWidth;
size_t x;
for (x = 0; x < destRowWidth; x++) {
// size_t x3 = x * 3;
// UInt32 p = src[srcRow + x];
// dest[destRow + x3] = 0xFF - (p >> 16 & 0xFF);
// dest[destRow + x3 + 1] = 0xFF - (p >> 8 & 0xFF);
// dest[destRow + x3 + 2] = 0xFF - (p & 0xFF);
CGGI_CopyARGBPixelToRGBPixel(src[srcRow + x],
dest + destRow + x * 3);
}
......@@ -260,13 +279,9 @@ CGGI_CopyImageFromCanvasToRGBInfo(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
//}
static inline UInt8
CGGI_ConvertPixelToGreyBit(UInt32 p)
CGGI_ConvertBWPixelToByteGray(UInt32 p)
{
#ifdef __LITTLE_ENDIAN__
return 0xFF - ((p >> 24 & 0xFF) + (p >> 16 & 0xFF) + (p >> 8 & 0xFF)) / 3;
#else
return 0xFF - ((p >> 16 & 0xFF) + (p >> 8 & 0xFF) + (p & 0xFF)) / 3;
#endif
return 0xFF - (((p >> 24 & 0xFF) + (p >> 16 & 0xFF) + (p >> 8 & 0xFF)) / 3);
}
static void
......@@ -281,14 +296,15 @@ CGGI_CopyImageFromCanvasToAlphaInfo(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
size_t height = info->height;
size_t y;
// fill empty glyph image with black-on-white glyph
for (y = 0; y < height; y++) {
size_t destRow = y * destRowWidth;
size_t srcRow = y * srcRowWidth;
size_t x;
for (x = 0; x < destRowWidth; x++) {
UInt32 p = src[srcRow + x];
dest[destRow + x] = CGGI_ConvertPixelToGreyBit(p);
dest[destRow + x] = CGGI_ConvertBWPixelToByteGray(p);
}
}
}
......@@ -316,13 +332,11 @@ CGGI_GetRenderingMode(const AWTStrike *strike)
{
CGGI_RenderingMode mode;
mode.cgFontMode = strike->fStyle;
NSException *e = nil;
switch (strike->fAAStyle) {
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_DEFAULT:
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_OFF:
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_ON:
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_GASP:
default:
mode.glyphDescriptor = &grey;
break;
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
......@@ -331,6 +345,17 @@ CGGI_GetRenderingMode(const AWTStrike *strike)
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_LCD_VBGR:
mode.glyphDescriptor = &rgb;
break;
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_GASP:
case sun_awt_SunHints_INTVAL_TEXT_ANTIALIAS_DEFAULT:
default:
/* we expect that text antialiasing hint has been already
* evaluated. Report an error if we get 'unevaluated' hint here.
*/
e = [NSException
exceptionWithName:@"IllegalArgumentException"
reason:@"Invalid hint value"
userInfo:nil];
@throw e;
}
return mode;
......@@ -345,7 +370,8 @@ CGGI_GetRenderingMode(const AWTStrike *strike)
*/
static inline void
CGGI_InitCanvas(CGGI_GlyphCanvas *canvas,
const vImagePixelCount width, const vImagePixelCount height)
const vImagePixelCount width, const vImagePixelCount height,
const CGGI_RenderingMode* mode)
{
// our canvas is *always* 4-byte ARGB
size_t bytesPerRow = width * sizeof(UInt32);
......@@ -356,19 +382,26 @@ CGGI_InitCanvas(CGGI_GlyphCanvas *canvas,
canvas->image->height = height;
canvas->image->rowBytes = bytesPerRow;
canvas->image->data = (void *)calloc(byteCount, sizeof(UInt32));
canvas->image->data = (void *)calloc(byteCount, sizeof(UInt8));
if (canvas->image->data == NULL) {
[[NSException exceptionWithName:NSMallocException
reason:@"Failed to allocate memory for the buffer which backs the CGContext for glyph strikes." userInfo:nil] raise];
}
CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
uint32_t bmpInfo = kCGImageAlphaPremultipliedFirst;
if (mode->glyphDescriptor == &rgb) {
bmpInfo |= kCGBitmapByteOrder32Host;
}
CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
canvas->context = CGBitmapContextCreate(canvas->image->data,
width, height, 8, bytesPerRow,
colorSpace,
kCGImageAlphaPremultipliedFirst);
bmpInfo);
// set foreground color
CGContextSetRGBFillColor(canvas->context, 0.0f, 0.0f, 0.0f, 1.0f);
CGContextSetFontSize(canvas->context, 1);
CGContextSaveGState(canvas->context);
......@@ -404,7 +437,9 @@ CGGI_FreeCanvas(CGGI_GlyphCanvas *canvas)
* Quick and easy inline to check if this canvas is big enough.
*/
static inline void
CGGI_SizeCanvas(CGGI_GlyphCanvas *canvas, const vImagePixelCount width, const vImagePixelCount height, const JRSFontRenderingStyle style)
CGGI_SizeCanvas(CGGI_GlyphCanvas *canvas, const vImagePixelCount width,
const vImagePixelCount height,
const CGGI_RenderingMode* mode)
{
if (canvas->image != NULL &&
width < canvas->image->width &&
......@@ -418,8 +453,9 @@ CGGI_SizeCanvas(CGGI_GlyphCanvas *canvas, const vImagePixelCount width, const vI
CGGI_FreeCanvas(canvas);
CGGI_InitCanvas(canvas,
width * CGGI_GLYPH_CANVAS_SLACK,
height * CGGI_GLYPH_CANVAS_SLACK);
JRSFontSetRenderingStyleOnContext(canvas->context, style);
height * CGGI_GLYPH_CANVAS_SLACK,
mode);
JRSFontSetRenderingStyleOnContext(canvas->context, mode->cgFontMode);
}
/*
......@@ -443,6 +479,7 @@ CGGI_ClearCanvas(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
Pixel_8888 opaqueWhite = { 0xFF, 0xFF, 0xFF, 0xFF };
#endif
// clear canvas background and set foreground color
vImageBufferFill_ARGB8888(&canvasRectToClear, opaqueWhite, kvImageNoFlags);
}
......@@ -577,7 +614,7 @@ CGGI_CreateImageForUnicode
GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
// fix the context size, just in case the substituted character is unexpectedly large
CGGI_SizeCanvas(canvas, info->width, info->height, mode->cgFontMode);
CGGI_SizeCanvas(canvas, info->width, info->height, mode);
// align the transform for the real CoreText strike
CGContextSetTextMatrix(canvas->context, strike->fAltTx);
......@@ -653,8 +690,11 @@ CGGI_FillImagesForGlyphsWithSizedCanvas(CGGI_GlyphCanvas *canvas,
#endif
}
static NSString *threadLocalCanvasKey =
@"Java CoreGraphics Text Renderer Cached Canvas";
static NSString *threadLocalAACanvasKey =
@"Java CoreGraphics Text Renderer Cached Canvas for AA";
static NSString *threadLocalLCDCanvasKey =
@"Java CoreGraphics Text Renderer Cached Canvas for LCD";
/*
* This is the maximum length and height times the above slack squared
......@@ -678,25 +718,28 @@ CGGI_FillImagesForGlyphs(jlong *glyphInfos, const AWTStrike *strike,
CGGI_GLYPH_CANVAS_MAX*CGGI_GLYPH_CANVAS_MAX*CGGI_GLYPH_CANVAS_SLACK*CGGI_GLYPH_CANVAS_SLACK)
{
CGGI_GlyphCanvas *tmpCanvas = [[CGGI_GlyphCanvas alloc] init];
CGGI_InitCanvas(tmpCanvas, maxWidth, maxHeight);
CGGI_InitCanvas(tmpCanvas, maxWidth, maxHeight, mode);
CGGI_FillImagesForGlyphsWithSizedCanvas(tmpCanvas, strike,
mode, glyphInfos, uniChars,
glyphs, len);
mode, glyphInfos, uniChars,
glyphs, len);
CGGI_FreeCanvas(tmpCanvas);
[tmpCanvas release];
return;
}
NSMutableDictionary *threadDict =
[[NSThread currentThread] threadDictionary];
CGGI_GlyphCanvas *canvas = [threadDict objectForKey:threadLocalCanvasKey];
NSString* theKey = (mode->glyphDescriptor == &rgb) ?
threadLocalLCDCanvasKey : threadLocalAACanvasKey;
CGGI_GlyphCanvas *canvas = [threadDict objectForKey:theKey];
if (canvas == nil) {
canvas = [[CGGI_GlyphCanvas alloc] init];
[threadDict setObject:canvas forKey:threadLocalCanvasKey];
[threadDict setObject:canvas forKey:theKey];
}
CGGI_SizeCanvas(canvas, maxWidth, maxHeight, mode->cgFontMode);
CGGI_SizeCanvas(canvas, maxWidth, maxHeight, mode);
CGGI_FillImagesForGlyphsWithSizedCanvas(canvas, strike, mode,
glyphInfos, uniChars, glyphs, len);
}
......
......@@ -37,6 +37,7 @@
- (void) registerWithProcessManager;
- (void) setDockIconWithEnv:(JNIEnv *)env;
- (void) postDummyEvent;
- (void) postRunnableEvent:(void (^)())block;
- (void) waitForDummyEvent;
+ (void) runAWTLoopWithApp:(NSApplication*)app;
......
......@@ -338,9 +338,13 @@ AWT_ASSERT_APPKIT_THREAD;
- (void)sendEvent:(NSEvent *)event
{
if ([event type] == NSApplicationDefined && TS_EQUAL([event timestamp], dummyEventTimestamp)) {
if ([event type] == NSApplicationDefined && TS_EQUAL([event timestamp], dummyEventTimestamp) && [event subtype] == 0) {
[seenDummyEventLock lockWhenCondition:NO];
[seenDummyEventLock unlockWithCondition:YES];
} else if ([event type] == NSApplicationDefined && [event subtype] == 777) {
void (^block)() = (void (^)()) [event data1];
block();
[block release];
} else if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask)) {
// Cocoa won't send us key up event when releasing a key while Cmd is down,
// so we have to do it ourselves.
......@@ -350,6 +354,33 @@ AWT_ASSERT_APPKIT_THREAD;
}
}
/*
* Posts the block to the AppKit event queue which will be executed
* on the main AppKit loop.
* While running nested loops this event will be ignored.
*/
- (void)postRunnableEvent:(void (^)())block
{
void (^copy)() = [block copy];
NSInteger encode = (NSInteger) copy;
[copy retain];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSEvent* event = [NSEvent otherEventWithType: NSApplicationDefined
location: NSMakePoint(0,0)
modifierFlags: 0
timestamp: 0
windowNumber: 0
context: nil
subtype: 777
data1: encode
data2: 0];
[NSApp postEvent: event atStart: NO];
[pool drain];
}
- (void)postDummyEvent {
seenDummyEventLock = [[NSConditionLock alloc] initWithCondition:NO];
dummyEventTimestamp = [NSProcessInfo processInfo].systemUptime;
......
......@@ -88,7 +88,7 @@ iconified=minimerad
modal=modal
multiline=flera rader
multiselectable=flerval
opaque=t\u00E4ckande
opaque=ogenomskinlig
pressed=nedtryckt
resizable=storleks\u00E4ndringsbar
selectable=valbar
......
......@@ -44,11 +44,11 @@ FileChooser.filterLabel.textAndMnemonic=Filter:
FileChooser.foldersLabel.textAndMnemonic=Map&par
FileChooser.filesLabel.textAndMnemonic=&Filer
FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan Filv\u00E4ljare.
FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan f\u00F6r filval.
FileChooser.saveButtonToolTip.textAndMnemonic=Spara vald fil.
FileChooser.openButtonToolTip.textAndMnemonic=\u00D6ppna vald fil.
FileChooser.renameFileDialog.textAndMnemonic=Namn\u00E4ndra fil "{0}" till
FileChooser.renameFileDialog.textAndMnemonic=\u00C4ndra namn p\u00E5 fil "{0}" till
FileChooser.renameFileError.titleAndMnemonic=Fel
FileChooser.renameFileError.textAndMnemonic=Fel vid namn\u00E4ndring av fil "{0}" till "{1}"
......@@ -33,8 +33,8 @@ FileChooser.filesLabel.textAndMnemonic=F&iler
FileChooser.enterFileNameLabel.textAndMnemonic=A&nge filnamn:
FileChooser.enterFolderNameLabel.textAndMnemonic=Ange ett mappnamn:
FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan Filv\u00E4ljare.
FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan f\u00F6r filval.
FileChooser.saveButtonToolTip.textAndMnemonic=Spara vald fil.
FileChooser.openButtonToolTip.textAndMnemonic=\u00D6ppna vald fil.
FileChooser.updateButtonToolTip.textAndMnemonic=Uppdatera kataloglistan.
FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp - Filv\u00E4ljare.
FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp f\u00F6r val av fil.
......@@ -439,9 +439,14 @@ public final class Connection implements Runnable {
BerDecoder readReply(LdapRequest ldr)
throws IOException, NamingException {
BerDecoder rber;
boolean waited = false;
while (((rber = ldr.getReplyBer()) == null) && !waited) {
// Track down elapsed time to workaround spurious wakeups
long elapsedMilli = 0;
long elapsedNano = 0;
while (((rber = ldr.getReplyBer()) == null) &&
(readTimeout <= 0 || elapsedMilli < readTimeout))
{
try {
// If socket closed, don't even try
synchronized (this) {
......@@ -455,11 +460,15 @@ public final class Connection implements Runnable {
rber = ldr.getReplyBer();
if (rber == null) {
if (readTimeout > 0) { // Socket read timeout is specified
long beginNano = System.nanoTime();
// will be woken up before readTimeout only if reply is
// will be woken up before readTimeout if reply is
// available
ldr.wait(readTimeout);
waited = true;
ldr.wait(readTimeout - elapsedMilli);
elapsedNano += (System.nanoTime() - beginNano);
elapsedMilli += elapsedNano / 1000_000;
elapsedNano %= 1000_000;
} else {
// no timeout is set so we wait infinitely until
// a response is received
......@@ -476,7 +485,7 @@ public final class Connection implements Runnable {
}
}
if ((rber == null) && waited) {
if ((rber == null) && (elapsedMilli >= readTimeout)) {
abandonRequest(ldr, null);
throw new NamingException("LDAP response read timed out, timeout used:"
+ readTimeout + "ms." );
......
#
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -77,7 +77,7 @@ cachedrowsetimpl.pagesize1 = Sidstorleken f\u00E5r inte \u00F6verstiga maxRows
cachedrowsetimpl.fwdonly = ResultSet kan endast g\u00E5 fram\u00E5t
cachedrowsetimpl.type = Typ: {0}
cachedrowsetimpl.opnotysupp = Det finns \u00E4nnu inget st\u00F6d f\u00F6r denna \u00E5tg\u00E4rd
cachedrowsetimpl.featnotsupp = Det finns inget st\u00F6d f\u00F6r denna funktion
cachedrowsetimpl.featnotsupp = Funktionen st\u00F6ds inte
# WebRowSetImpl exceptions
webrowsetimpl.nullhash = Kan inte instansiera WebRowSetImpl. Null-hashtabell skickades till konstruktor.
......@@ -100,7 +100,7 @@ joinrowsetimpl.genericerr = Allm\u00E4nt initieringsfel f\u00F6r JoinRowSet
joinrowsetimpl.emptyrowset = Tomma radupps\u00E4ttningar kan inte l\u00E4ggas till i denna JoinRowSet
#JdbcRowSetImpl exceptions
jdbcrowsetimpl.invalstate = Ogiltig status
jdbcrowsetimpl.invalstate = Ogiltigt tillst\u00E5nd
jdbcrowsetimpl.connect = JdbcRowSet (anslut) JNDI kan inte anslutas
jdbcrowsetimpl.paramtype = Kan inte h\u00E4rleda parametertypen
jdbcrowsetimpl.matchcols = Matchningskolumnerna \u00E4r inte samma som de som st\u00E4llts in
......@@ -112,7 +112,7 @@ jdbcrowsetimpl.usecolname = Anv\u00E4nd kolumnnamn som argument f\u00F6r unsetMa
jdbcrowsetimpl.usecolid = Anv\u00E4nd kolumn-id som argument f\u00F6r unsetMatchColumn
jdbcrowsetimpl.resnotupd = ResultSet \u00E4r inte uppdateringsbart
jdbcrowsetimpl.opnotysupp = Det finns \u00E4nnu inget st\u00F6d f\u00F6r denna \u00E5tg\u00E4rd
jdbcrowsetimpl.featnotsupp = Det finns inget st\u00F6d f\u00F6r denna funktion
jdbcrowsetimpl.featnotsupp = Funktionen st\u00F6ds inte
#CachedRowSetReader exceptions
crsreader.connect = (JNDI) kan inte anslutas
......@@ -149,15 +149,15 @@ wrsxmlwriter.failedwrite = Kunde inte skriva v\u00E4rdet
wsrxmlwriter.notproper = Ingen riktig typ
#XmlReaderContentHandler exceptions
xmlrch.errmap = Fel uppstod vid inst\u00E4llning av mappning: {0}
xmlrch.errmetadata = Fel uppstod vid inst\u00E4llning av metadata: {0}
xmlrch.errinsertval = Fel uppstod vid infogning av v\u00E4rden: {0}
xmlrch.errconstr = Fel uppstod vid konstruktion av rad: {0}
xmlrch.errdel = Fel uppstod vid borttagning av rad: {0}
xmlrch.errinsert = Fel uppstod vid konstruktion av infogad rad: {0}
xmlrch.errinsdel = Fel uppstod vid konstruktion av insdel-rad: {0}
xmlrch.errupdate = Fel uppstod vid konstruktion av uppdateringsrad: {0}
xmlrch.errupdrow = Fel uppstod vid uppdatering av rad: {0}
xmlrch.errmap = Ett fel intr\u00E4ffade vid inst\u00E4llning av mappning: {0}
xmlrch.errmetadata = Ett fel intr\u00E4ffade vid inst\u00E4llning av metadata: {0}
xmlrch.errinsertval = Ett fel intr\u00E4ffade vid infogning av v\u00E4rden: {0}
xmlrch.errconstr = Ett fel intr\u00E4ffade vid konstruktion av rad: {0}
xmlrch.errdel = Ett fel intr\u00E4ffade vid borttagning av rad: {0}
xmlrch.errinsert = Ett fel intr\u00E4ffade vid konstruktion av infogad rad: {0}
xmlrch.errinsdel = Ett fel intr\u00E4ffade vid konstruktion av insdel-rad: {0}
xmlrch.errupdate = Ett fel intr\u00E4ffade vid konstruktion av uppdateringsrad: {0}
xmlrch.errupdrow = Ett fel intr\u00E4ffade vid uppdatering av rad: {0}
xmlrch.chars = tecken:
xmlrch.badvalue = Felaktigt v\u00E4rde; egenskapen kan inte ha ett tomt v\u00E4rde
xmlrch.badvalue1 = Felaktigt v\u00E4rde; metadatan kan inte ha ett tomt v\u00E4rde
......
......@@ -1301,6 +1301,25 @@ public abstract class Component implements ImageObserver, MenuContainer,
return visible && (parent == null || parent.isRecursivelyVisible());
}
/**
* Determines the bounds of a visible part of the component relative to its
* parent.
*
* @return the visible part of bounds
*/
private Rectangle getRecursivelyVisibleBounds() {
final Component container = getContainer();
final Rectangle bounds = getBounds();
if (container == null) {
// we are top level window or haven't a container, return our bounds
return bounds;
}
// translate the container's bounds to our coordinate space
final Rectangle parentsBounds = container.getRecursivelyVisibleBounds();
parentsBounds.setLocation(0, 0);
return parentsBounds.intersection(bounds);
}
/**
* Translates absolute coordinates into coordinates in the coordinate
* space of this component.
......@@ -1473,7 +1492,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
ComponentPeer peer = this.peer;
if (peer != null) {
peer.setEnabled(true);
if (visible) {
if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
updateCursorImmediately();
}
}
......@@ -1522,7 +1541,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
ComponentPeer peer = this.peer;
if (peer != null) {
peer.setEnabled(false);
if (visible) {
if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
updateCursorImmediately();
}
}
......
......@@ -44,6 +44,7 @@ import java.io.PrintWriter;
import java.lang.ref.WeakReference;
import java.security.AccessController;
import java.util.ArrayList;
import java.util.EventListener;
import java.util.HashSet;
import java.util.Set;
......@@ -100,7 +101,7 @@ public class Container extends Component {
* @see #add
* @see #getComponents
*/
private java.util.List<Component> component = new java.util.ArrayList<Component>();
private java.util.List<Component> component = new ArrayList<>();
/**
* Layout manager for this container.
......@@ -2545,28 +2546,24 @@ public class Container extends Component {
if (!contains(x, y)) {
return null;
}
Component lightweight = null;
synchronized (getTreeLock()) {
// Two passes: see comment in sun.awt.SunGraphicsCallback
for (int i = 0; i < component.size(); i++) {
Component comp = component.get(i);
if (comp != null &&
!(comp.peer instanceof LightweightPeer)) {
if (comp.contains(x - comp.x, y - comp.y)) {
// Optimized version of two passes:
// see comment in sun.awt.SunGraphicsCallback
for (final Component comp : component) {
if (comp.contains(x - comp.x, y - comp.y)) {
if (!comp.isLightweight()) {
// return heavyweight component as soon as possible
return comp;
}
}
}
for (int i = 0; i < component.size(); i++) {
Component comp = component.get(i);
if (comp != null &&
comp.peer instanceof LightweightPeer) {
if (comp.contains(x - comp.x, y - comp.y)) {
return comp;
if (lightweight == null) {
// save and return later the first lightweight component
lightweight = comp;
}
}
}
}
return this;
return lightweight != null ? lightweight : this;
}
/**
......@@ -2670,52 +2667,54 @@ public class Container extends Component {
return null;
}
final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled){
checkTreeLock();
final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled) {
// checkTreeLock(); commented for a performance reason
if (!(contains(x, y) && visible && (ignoreEnabled || enabled))) {
return null;
}
// Two passes: see comment in sun.awt.SunGraphicsCallback
for (int i = 0; i < component.size(); i++) {
Component comp = component.get(i);
if (comp != null &&
!(comp.peer instanceof LightweightPeer)) {
if (comp instanceof Container) {
comp = ((Container)comp).findComponentAtImpl(x - comp.x,
y - comp.y,
ignoreEnabled);
} else {
comp = comp.getComponentAt(x - comp.x, y - comp.y);
}
if (comp != null && comp.visible &&
(ignoreEnabled || comp.enabled))
{
return comp;
}
Component lightweight = null;
// Optimized version of two passes:
// see comment in sun.awt.SunGraphicsCallback
for (final Component comp : component) {
final int x1 = x - comp.x;
final int y1 = y - comp.y;
if (!comp.contains(x1, y1)) {
continue; // fast path
}
}
for (int i = 0; i < component.size(); i++) {
Component comp = component.get(i);
if (comp != null &&
comp.peer instanceof LightweightPeer) {
if (comp instanceof Container) {
comp = ((Container)comp).findComponentAtImpl(x - comp.x,
y - comp.y,
ignoreEnabled);
} else {
comp = comp.getComponentAt(x - comp.x, y - comp.y);
if (!comp.isLightweight()) {
final Component child = getChildAt(comp, x1, y1, ignoreEnabled);
if (child != null) {
// return heavyweight component as soon as possible
return child;
}
if (comp != null && comp.visible &&
(ignoreEnabled || comp.enabled))
{
return comp;
} else {
if (lightweight == null) {
// save and return later the first lightweight component
lightweight = getChildAt(comp, x1, y1, ignoreEnabled);
}
}
}
return lightweight != null ? lightweight : this;
}
return this;
/**
* Helper method for findComponentAtImpl. Finds a child component using
* findComponentAtImpl for Container and getComponentAt for Component.
*/
private static Component getChildAt(Component comp, int x, int y,
boolean ignoreEnabled) {
if (comp instanceof Container) {
comp = ((Container) comp).findComponentAtImpl(x, y,
ignoreEnabled);
} else {
comp = comp.getComponentAt(x, y);
}
if (comp != null && comp.visible &&
(ignoreEnabled || comp.enabled)) {
return comp;
}
return null;
}
/**
......@@ -4402,6 +4401,18 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
private static final int BUTTONS_DOWN_MASK;
static {
int[] buttonsDownMask = AWTAccessor.getInputEventAccessor().
getButtonDownMasks();
int mask = 0;
for (int buttonDownMask : buttonsDownMask) {
mask |= buttonDownMask;
}
BUTTONS_DOWN_MASK = mask;
}
LightweightDispatcher(Container nativeContainer) {
this.nativeContainer = nativeContainer;
mouseEventTarget = new WeakReference<>(null);
......@@ -4470,25 +4481,12 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
private boolean isMouseGrab(MouseEvent e) {
int modifiers = e.getModifiersEx();
if(e.getID() == MouseEvent.MOUSE_PRESSED
|| e.getID() == MouseEvent.MOUSE_RELEASED)
{
switch (e.getButton()) {
case MouseEvent.BUTTON1:
modifiers ^= InputEvent.BUTTON1_DOWN_MASK;
break;
case MouseEvent.BUTTON2:
modifiers ^= InputEvent.BUTTON2_DOWN_MASK;
break;
case MouseEvent.BUTTON3:
modifiers ^= InputEvent.BUTTON3_DOWN_MASK;
break;
}
if (e.getID() == MouseEvent.MOUSE_PRESSED
|| e.getID() == MouseEvent.MOUSE_RELEASED) {
modifiers ^= InputEvent.getMaskForButton(e.getButton());
}
/* modifiers now as just before event */
return ((modifiers & (InputEvent.BUTTON1_DOWN_MASK
| InputEvent.BUTTON2_DOWN_MASK
| InputEvent.BUTTON3_DOWN_MASK)) != 0);
return ((modifiers & BUTTONS_DOWN_MASK) != 0);
}
/**
......
......@@ -496,9 +496,8 @@ public class ScrollPane extends Container implements Accessible {
Point p = getScrollPosition();
Dimension cs = calculateChildSize();
Dimension vs = getViewportSize();
Insets i = getInsets();
c.reshape(i.left - p.x, i.top - p.y, cs.width, cs.height);
c.reshape(- p.x, - p.y, cs.width, cs.height);
ScrollPanePeer peer = (ScrollPanePeer)this.peer;
if (peer != null) {
peer.childResized(cs.width, cs.height);
......
......@@ -312,11 +312,16 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
ret = socketGetOption(opt, null);
return new Integer(ret);
case IP_TOS:
ret = socketGetOption(opt, null);
if (ret == -1) { // ipv6 tos
return new Integer(trafficClass);
} else {
return new Integer(ret);
try {
ret = socketGetOption(opt, null);
if (ret == -1) { // ipv6 tos
return trafficClass;
} else {
return ret;
}
} catch (SocketException se) {
// TODO - should make better effort to read TOS or TCLASS
return trafficClass; // ipv6 tos
}
case SO_KEEPALIVE:
ret = socketGetOption(opt, null);
......
......@@ -1182,7 +1182,14 @@ class DatagramSocket implements java.io.Closeable {
if (isClosed())
throw new SocketException("Socket is closed");
getImpl().setOption(SocketOptions.IP_TOS, new Integer(tc));
try {
getImpl().setOption(SocketOptions.IP_TOS, tc);
} catch (SocketException se) {
// not supported if socket already connected
// Solaris returns error in such cases
if(!isConnected())
throw se;
}
}
/**
......
......@@ -1378,7 +1378,14 @@ class Socket implements java.io.Closeable {
if (isClosed())
throw new SocketException("Socket is closed");
getImpl().setOption(SocketOptions.IP_TOS, new Integer(tc));
try {
getImpl().setOption(SocketOptions.IP_TOS, tc);
} catch (SocketException se) {
// not supported if socket already connected
// Solaris returns error in such cases
if(!isConnected())
throw se;
}
}
/**
......
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -25,7 +25,6 @@
package java.security;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
......@@ -457,37 +456,24 @@ public class ProtectionDomain {
/**
* Used for storing ProtectionDomains as keys in a Map.
*/
final static class Key {}
// A cache of ProtectionDomains and their Permissions
private static class PDCache implements ProtectionDomainCache {
// We must wrap the PermissionCollection in a WeakReference as there
// are some PermissionCollections which contain strong references
// back to a ProtectionDomain and otherwise would never be removed
// from the WeakHashMap
private final Map<Key, WeakReference<PermissionCollection>>
map = new WeakHashMap<>();
@Override
public synchronized void put(ProtectionDomain pd,
PermissionCollection pc) {
map.put(pd == null ? null : pd.key, new WeakReference<>(pc));
}
@Override
public synchronized PermissionCollection get(ProtectionDomain pd) {
WeakReference<PermissionCollection> ref =
map.get(pd == null ? null : pd.key);
return ref == null ? null : ref.get();
}
}
final class Key {}
static {
SharedSecrets.setJavaSecurityProtectionDomainAccess(
new JavaSecurityProtectionDomainAccess() {
@Override
public ProtectionDomainCache getProtectionDomainCache() {
return new PDCache();
return new ProtectionDomainCache() {
private final Map<Key, PermissionCollection> map =
Collections.synchronizedMap
(new WeakHashMap<Key, PermissionCollection>());
public void put(ProtectionDomain pd,
PermissionCollection pc) {
map.put((pd == null ? null : pd.key), pc);
}
public PermissionCollection get(ProtectionDomain pd) {
return pd == null ? map.get(null) : map.get(pd.key);
}
};
}
});
}
......
......@@ -461,7 +461,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* <code>false</code> that it is not. The default is <code>true</code>.
* @serial
*/
private boolean escapeProcessing;
private boolean escapeProcessing = true;
/**
* A constant indicating the isolation level of the connection
......
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -48,6 +48,8 @@ import java.lang.reflect.*;
* Therefore, any <code>RowSetMetaDataImpl</code> method that retrieves information
* is defined as having unspecified behavior when it is called
* before the <code>RowSet</code> object contains data.
*
* @since 1.5
*/
public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
......@@ -579,7 +581,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
*
* @param columnIndex the first column is 1, the second is 2, and so on;
* must be between <code>1</code> and the number of columns, inclusive
* @return <code>true</code> if if a value in the designated column is a signed
* @return <code>true</code> if a value in the designated column is a signed
* number; <code>false</code> otherwise
* @throws SQLException if a database access error occurs
* or the given column number is out of bounds
......@@ -605,7 +607,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
}
/**
* Retrieves the the suggested column title for the designated
* Retrieves the suggested column title for the designated
* column for use in printouts and displays.
*
* @param columnIndex the first column is 1, the second is 2, and so on;
......@@ -801,8 +803,10 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* @throws SQLException if a database access error occurs
* or the given column number is out of bounds
*/
public boolean isDefinitelyWritable(int columnIndex)
throws SQLException { return true;}
public boolean isDefinitelyWritable(int columnIndex) throws SQLException {
checkColRange(columnIndex);
return true;
}
/**
* Retrieves the fully-qualified name of the class in the Java
......@@ -1071,7 +1075,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
public int colType;
/**
* The field that holds the the type name used by this particular data source
* The field that holds the type name used by this particular data source
* for the value stored in this column.
*
* @serial
......@@ -1079,7 +1083,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
public String colTypeName;
/**
* The field that holds the updatablity boolean per column of a RowSet
* The field that holds the updatability boolean per column of a RowSet
*
* @serial
*/
......
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -50,14 +50,11 @@ import java.sql.SQLException;
* The inherited methods <code>getMessage</code>, <code>getSQLState</code>,
* and <code>getErrorCode</code> retrieve information contained in a
* <code>RowSetWarning</code> object.
*
* @since 1.5
*/
public class RowSetWarning extends SQLException {
/**
* RowSetWarning object handle.
*/
private RowSetWarning rwarning;
/**
* Constructs a <code>RowSetWarning</code> object
* with the given value for the reason; SQLState defaults to null,
......@@ -109,7 +106,7 @@ public class RowSetWarning extends SQLException {
* @param reason a <code>String</code> giving a description of the
* warning;
* @param SQLState an XOPEN code identifying the warning; if a non standard
* XPOEN <i>SQLState</i> is supplied, no exception is thrown.
* XOPEN <i>SQLState</i> is supplied, no exception is thrown.
* @param vendorCode a database vendor-specific warning code
*/
public RowSetWarning(java.lang.String reason, java.lang.String SQLState, int vendorCode) {
......@@ -126,7 +123,15 @@ public class RowSetWarning extends SQLException {
* @see #setNextWarning
*/
public RowSetWarning getNextWarning() {
return rwarning;
SQLException warning = getNextException();
if ( warning == null || warning instanceof RowSetWarning) {
return (RowSetWarning)warning;
} else {
// The chained value isn't a RowSetWarning.
// This is a programming error by whoever added it to
// the RowSetWarning chain. We throw a Java "Error".
throw new Error("RowSetWarning chain holds value that is not a RowSetWarning: ");
}
}
/**
......@@ -139,7 +144,7 @@ public class RowSetWarning extends SQLException {
* @see #getNextWarning
*/
public void setNextWarning(RowSetWarning warning) {
rwarning = warning;
setNextException(warning);
}
static final long serialVersionUID = 6678332766434564774L;
......
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -38,7 +38,6 @@ import javax.accessibility.*;
import java.io.ObjectOutputStream;
import java.io.IOException;
import java.lang.StringBuilder;
import java.beans.PropertyChangeListener;
import sun.awt.AppContext;
import sun.swing.SwingUtilities2;
......@@ -1650,7 +1649,7 @@ public class JInternalFrame extends JComponent implements
* <dt><code>DO_NOTHING_ON_CLOSE</code>
* <dd> Do nothing.
* This requires the program to handle the operation
* in the <code>windowClosing</code> method
* in the <code>internalFrameClosing</code> method
* of a registered <code>InternalFrameListener</code> object.
* <dt><code>HIDE_ON_CLOSE</code>
* <dd> Automatically make the internal frame invisible.
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -42,8 +42,6 @@ import java.text.spi.NumberFormatProvider;
import javax.accessibility.*;
import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleResources;
import sun.util.locale.provider.LocaleServiceProviderPool;
/**
* A single line input field that lets the user select a
......@@ -77,12 +75,12 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* try {
* spinner.commitEdit();
* }
* catch (ParseException pe) {{
* catch (ParseException pe) {
* // Edited value is invalid, spinner.getValue() will return
* // the last valid value, you could revert the spinner to show that:
* JComponent editor = spinner.getEditor()
* JComponent editor = spinner.getEditor();
* if (editor instanceof DefaultEditor) {
* ((DefaultEditor)editor).getTextField().setValue(spinner.getValue();
* ((DefaultEditor)editor).getTextField().setValue(spinner.getValue());
* }
* // reset the value to some known value:
* spinner.setValue(fallbackValue);
......
......@@ -181,9 +181,16 @@ public class RepaintManager
*/
private final ProcessingRunnable processingRunnable;
private final static JavaSecurityAccess javaSecurityAccess =
SharedSecrets.getJavaSecurityAccess();
private static final JavaSecurityAccess javaSecurityAccess =
SharedSecrets.getJavaSecurityAccess();
/**
* Listener installed to detect display changes. When display changes,
* schedules a callback to notify all RepaintManagers of the display
* changes.
*/
private static final DisplayChangedListener displayChangedHandler =
new DisplayChangedHandler();
static {
SwingAccessor.setRepaintManagerAccessor(new SwingAccessor.RepaintManagerAccessor() {
......@@ -225,8 +232,8 @@ public class RepaintManager
GraphicsEnvironment ge = GraphicsEnvironment.
getLocalGraphicsEnvironment();
if (ge instanceof SunGraphicsEnvironment) {
((SunGraphicsEnvironment)ge).addDisplayChangedListener(
new DisplayChangedHandler());
((SunGraphicsEnvironment) ge).addDisplayChangedListener(
displayChangedHandler);
}
Toolkit tk = Toolkit.getDefaultToolkit();
if ((tk instanceof SunToolkit)
......@@ -1649,6 +1656,12 @@ public class RepaintManager
*/
private static final class DisplayChangedHandler implements
DisplayChangedListener {
// Empty non private constructor was added because access to this
// class shouldn't be generated by the compiler using synthetic
// accessor method
DisplayChangedHandler() {
}
public void displayChanged() {
scheduleDisplayChanges();
}
......@@ -1656,11 +1669,10 @@ public class RepaintManager
public void paletteChanged() {
}
private void scheduleDisplayChanges() {
private static void scheduleDisplayChanges() {
// To avoid threading problems, we notify each RepaintManager
// on the thread it was created on.
for (Object c : AppContext.getAppContexts()) {
AppContext context = (AppContext) c;
for (AppContext context : AppContext.getAppContexts()) {
synchronized(context) {
if (!context.isDisposed()) {
EventQueue eventQueue = (EventQueue)context.get(
......
/*
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -92,10 +92,10 @@ public class MsgAppletViewer_sv extends ListResourceBundle {
{"appletviewer.main.debug.cantaccess", "Det finns ingen \u00E5tkomst till fels\u00F6kningsprogrammet!"},
{"appletviewer.main.nosecmgr", "Varning: SecurityManager har inte installerats!"},
{"appletviewer.main.warning", "Varning: Inga appletar har startats. Kontrollera att indata inneh\u00E5ller <applet>-tagg."},
{"appletviewer.main.warn.prop.overwrite", "Varning: Skriver tillf\u00E4lligt \u00F6ver systemegenskap enligt beg\u00E4ran fr\u00E5n anv\u00E4ndare: nyckel: {0} gammalt v\u00E4rde: {1} nytt v\u00E4rde: {2}"},
{"appletviewer.main.warn.prop.overwrite", "Varning: Skriver tillf\u00E4lligt \u00F6ver systemegenskap enligt beg\u00E4ran fr\u00E5n anv\u00E4ndare: nyckel: {0} tidigare v\u00E4rde: {1} nytt v\u00E4rde: {2}"},
{"appletviewer.main.warn.cantreadprops", "Varning: Kan inte l\u00E4sa egenskapsfil f\u00F6r AppletViewer: {0} Standardv\u00E4rden anv\u00E4nds."},
{"appletioexception.loadclass.throw.interrupted", "klassinl\u00E4sning avbr\u00F6ts: {0}"},
{"appletioexception.loadclass.throw.notloaded", "klass inte inl\u00E4st: {0}"},
{"appletioexception.loadclass.throw.interrupted", "klassladdning avbr\u00F6ts: {0}"},
{"appletioexception.loadclass.throw.notloaded", "klass inte laddad: {0}"},
{"appletclassloader.loadcode.verbose", "\u00D6ppnar str\u00F6m till: {0} f\u00F6r h\u00E4mtning av {1}"},
{"appletclassloader.filenotfound", "Hittade inte fil vid s\u00F6kning efter: {0}"},
{"appletclassloader.fileformat", "Undantag av filformat vid laddning av: {0}"},
......@@ -124,7 +124,7 @@ public class MsgAppletViewer_sv extends ListResourceBundle {
{"appletpanel.exception2", "undantag: {0}: {1}."},
{"appletpanel.error", "fel: {0}."},
{"appletpanel.error2", "fel {0}: {1}."},
{"appletpanel.notloaded", "Initiera: applet \u00E4r inte inl\u00E4st."},
{"appletpanel.notloaded", "Initiera: applet \u00E4r inte laddad."},
{"appletpanel.notinited", "Starta: applet \u00E4r inte initierad."},
{"appletpanel.notstarted", "Stoppa: applet har inte startats."},
{"appletpanel.notstopped", "Radera: applet har inte stoppats."},
......
......@@ -2905,13 +2905,13 @@ search:
return comp;
}
if (flavor1.isFlavorTextType()) {
return 1;
}
if (flavor2.isFlavorTextType()) {
return -1;
}
// if (flavor1.isFlavorTextType()) {
// return 1;
// }
//
// if (flavor2.isFlavorTextType()) {
// return -1;
// }
// Next, look for application/x-java-* types. Prefer unknown
// MIME types because if the user provides his own data flavor,
......
......@@ -20,11 +20,11 @@ AWT.pause=Paus
AWT.capsLock=Caps Lock
AWT.escape=Esc
AWT.space=Mellanslag
AWT.pgup=Page Up
AWT.pgdn=Page Down
AWT.pgup=Sida upp
AWT.pgdn=Sida ned
AWT.end=End
AWT.home=Hem
AWT.left=V\u00E4nsterpil
AWT.left=V\u00E4nster
AWT.up=Upp
AWT.right=H\u00F6gerpil
AWT.down=Nedpil
......@@ -114,7 +114,7 @@ AWT.plus=Plus
AWT.minus=Minus
AWT.rightParenthesis=H\u00F6gerparentes
AWT.underscore=Understreck
AWT.final=Slutgiltig
AWT.final=Slutlig
AWT.convert=Konvertera
AWT.noconvert=Ingen konvertering
AWT.accept=Acceptera
......
......@@ -157,6 +157,21 @@ public abstract class Font2D {
}
}
public static final int FWIDTH_NORMAL = 5; // OS/2 usWidthClass
public static final int FWEIGHT_NORMAL = 400; // OS/2 usWeightClass
public static final int FWEIGHT_BOLD = 700; // OS/2 usWeightClass
public int getWidth() {
return FWIDTH_NORMAL;
}
public int getWeight() {
if ((style & Font.BOLD) !=0) {
return FWEIGHT_BOLD;
} else {
return FWEIGHT_NORMAL;
}
}
int getRank() {
return fontRank;
......
......@@ -27,6 +27,7 @@ package sun.font;
import java.io.File;
import java.awt.Font;
import java.util.Collection;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.Locale;
......@@ -134,7 +135,104 @@ public class FontFamily {
return java.util.Objects.equals(newDir, existDir);
}
/*
* We want a family to be of the same width and prefer medium/normal width.
* Once we find a particular width we accept more of the same width
* until we find one closer to normal when we 'evict' all existing fonts.
* So once we see a 'normal' width font we evict all members that are not
* normal width and then accept only new ones that are normal width.
*
* Once a font passes the width test we subject it to the weight test.
* For Plain we target the weight the closest that is <= NORMAL (400)
* For Bold we target the weight that is closest to BOLD (700).
*
* In the future, rather than discarding these fonts, we should
* extend the family to include these so lookups on these properties
* can locate them, as presently they will only be located by full name
* based lookup.
*/
private int familyWidth = 0;
private boolean preferredWidth(Font2D font) {
int newWidth = font.getWidth();
if (familyWidth == 0) {
familyWidth = newWidth;
return true;
}
if (newWidth == familyWidth) {
return true;
}
if (Math.abs(Font2D.FWIDTH_NORMAL - newWidth) <
Math.abs(Font2D.FWIDTH_NORMAL - familyWidth))
{
if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info(
"Found more preferred width. New width = " + newWidth +
" Old width = " + familyWidth + " in font " + font +
" nulling out fonts plain: " + plain + " bold: " + bold +
" italic: " + italic + " bolditalic: " + bolditalic);
}
familyWidth = newWidth;
plain = bold = italic = bolditalic = null;
return true;
} else if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info(
"Family rejecting font " + font +
" of less preferred width " + newWidth);
}
return false;
}
private boolean closerWeight(Font2D currFont, Font2D font, int style) {
if (familyWidth != font.getWidth()) {
return false;
}
if (currFont == null) {
return true;
}
if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info(
"New weight for style " + style + ". Curr.font=" + currFont +
" New font="+font+" Curr.weight="+ + currFont.getWeight()+
" New weight="+font.getWeight());
}
int newWeight = font.getWeight();
switch (style) {
case Font.PLAIN:
case Font.ITALIC:
return (newWeight <= Font2D.FWEIGHT_NORMAL &&
newWeight > currFont.getWeight());
case Font.BOLD:
case Font.BOLD|Font.ITALIC:
return (Math.abs(newWeight - Font2D.FWEIGHT_BOLD) <
Math.abs(currFont.getWeight() - Font2D.FWEIGHT_BOLD));
default:
return false;
}
}
public void setFont(Font2D font, int style) {
if (FontUtilities.isLogging()) {
String msg;
if (font instanceof CompositeFont) {
msg = "Request to add " + font.getFamilyName(null) +
" with style " + style + " to family " + familyName;
} else {
msg = "Request to add " + font +
" with style " + style + " to family " + this;
}
FontUtilities.getLogger().info(msg);
}
/* Allow a lower-rank font only if its a file font
* from the exact same source as any previous font.
*/
......@@ -152,19 +250,27 @@ public class FontFamily {
switch (style) {
case Font.PLAIN:
plain = font;
if (preferredWidth(font) && closerWeight(plain, font, style)) {
plain = font;
}
break;
case Font.BOLD:
bold = font;
if (preferredWidth(font) && closerWeight(bold, font, style)) {
bold = font;
}
break;
case Font.ITALIC:
italic = font;
if (preferredWidth(font) && closerWeight(italic, font, style)) {
italic = font;
}
break;
case Font.BOLD|Font.ITALIC:
bolditalic = font;
if (preferredWidth(font) && closerWeight(bolditalic, font, style)) {
bolditalic = font;
}
break;
default:
......@@ -316,6 +422,11 @@ public class FontFamily {
return allLocaleNames.get(name.toLowerCase());
}
public static FontFamily[] getAllFontFamilies() {
Collection<FontFamily> families = familyNameMap.values();
return families.toArray(new FontFamily[0]);
}
public String toString() {
return
"Font family: " + familyName +
......
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -33,42 +33,43 @@ import java.awt.Font;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
public class StandardTextSource extends TextSource {
char[] chars;
int start;
int len;
int cstart;
int clen;
int level; // assumed all uniform
int flags; // see GlyphVector.java
Font font;
FontRenderContext frc;
CoreMetrics cm;
/**
* Create a simple implementation of a TextSource.
*
* Chars is an array containing clen chars in the context, in
* logical order, contiguously starting at cstart. Start and len
* represent that portion of the context representing the true
* source; start, like cstart, is relative to the start of the
* character array.
*
* Level is the bidi level (0-63 for the entire context. Flags is
* the layout flags. Font is the font, frc is the render context,
* and lm is the line metrics for the entire source text, but not
* necessarily the context.
*/
public StandardTextSource(char[] chars,
int start,
int len,
int cstart,
int clen,
int level,
int flags,
Font font,
FontRenderContext frc,
CoreMetrics cm) {
final class StandardTextSource extends TextSource {
private final char[] chars;
private final int start;
private final int len;
private final int cstart;
private final int clen;
private final int level; // assumed all uniform
private final int flags; // see GlyphVector.java
private final Font font;
private final FontRenderContext frc;
private final CoreMetrics cm;
/**
* Create a simple implementation of a TextSource.
*
* Chars is an array containing clen chars in the context, in
* logical order, contiguously starting at cstart. Start and len
* represent that portion of the context representing the true
* source; start, like cstart, is relative to the start of the
* character array.
*
* Level is the bidi level (0-63 for the entire context. Flags is
* the layout flags. Font is the font, frc is the render context,
* and lm is the line metrics for the entire source text, but not
* necessarily the context.
*/
StandardTextSource(char[] chars,
int start,
int len,
int cstart,
int clen,
int level,
int flags,
Font font,
FontRenderContext frc,
CoreMetrics cm) {
if (chars == null) {
throw new IllegalArgumentException("bad chars: null");
}
......@@ -97,7 +98,7 @@ public class StandardTextSource extends TextSource {
throw new IllegalArgumentException("bad frc: null");
}
this.chars = chars.clone();
this.chars = chars;
this.start = start;
this.len = len;
this.cstart = cstart;
......@@ -115,40 +116,10 @@ public class StandardTextSource extends TextSource {
}
}
/** Create a StandardTextSource whose context is coextensive with the source. */
public StandardTextSource(char[] chars,
int start,
int len,
int level,
int flags,
Font font,
FontRenderContext frc,
CoreMetrics cm) {
this(chars, start, len, start, len, level, flags, font, frc, cm);
}
/** Create a StandardTextSource whose context and source are coextensive with the entire char array. */
public StandardTextSource(char[] chars,
int level,
int flags,
Font font,
FontRenderContext frc) {
this(chars, 0, chars.length, 0, chars.length, level, flags, font, frc, null);
}
/** Create a StandardTextSource whose context and source are all the text in the String. */
public StandardTextSource(String str,
int level,
int flags,
Font font,
FontRenderContext frc) {
this(str.toCharArray(), 0, str.length(), 0, str.length(), level, flags, font, frc, null);
}
// TextSource API
public char[] getChars() {
return chars.clone();
return chars;
}
public int getStart() {
......
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -48,12 +48,12 @@ import java.text.Bidi;
* @see TextLayout
*/
public class TextLabelFactory {
private FontRenderContext frc;
private char[] text;
private Bidi bidi;
public final class TextLabelFactory {
private final FontRenderContext frc;
private final char[] text;
private final Bidi bidi;
private Bidi lineBidi;
private int flags;
private final int flags;
private int lineStart;
private int lineLimit;
......
......@@ -959,6 +959,18 @@ public class TrueTypeFont extends FileFont {
setStyle(getTableBuffer(os_2Tag));
}
private int fontWidth = 0;
@Override
public int getWidth() {
return (fontWidth > 0) ? fontWidth : super.getWidth();
}
private int fontWeight = 0;
@Override
public int getWeight() {
return (fontWeight > 0) ? fontWeight : super.getWeight();
}
/* TrueTypeFont can use the fsSelection fields of OS/2 table
* to determine the style. In the unlikely case that doesn't exist,
* can use macStyle in the 'head' table but simpler to
......@@ -974,8 +986,15 @@ public class TrueTypeFont extends FileFont {
private static final int fsSelectionBoldBit = 0x00020;
private static final int fsSelectionRegularBit = 0x00040;
private void setStyle(ByteBuffer os_2Table) {
if (os_2Table == null) {
return;
}
if (os_2Table.capacity() >= 8) {
fontWeight = os_2Table.getChar(4) & 0xffff;
fontWidth = os_2Table.getChar(6) & 0xffff;
}
/* fsSelection is unsigned short at buffer offset 62 */
if (os_2Table == null || os_2Table.capacity() < 64) {
if (os_2Table.capacity() < 64) {
super.setStyle();
return;
}
......
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -59,6 +59,10 @@ final class OGLBlitLoops {
TransformBlit transformBlitIntArgbPreToSurface =
new OGLSwToSurfaceTransform(SurfaceType.IntArgbPre,
OGLSurfaceData.PF_INT_ARGB_PRE);
OGLSurfaceToSwBlit blitSurfaceToIntArgbPre =
new OGLSurfaceToSwBlit(SurfaceType.IntArgbPre,
OGLSurfaceData.PF_INT_ARGB_PRE);
GraphicsPrimitive[] primitives = {
// surface->surface ops
new OGLSurfaceToSurfaceBlit(),
......@@ -73,8 +77,7 @@ final class OGLBlitLoops {
// surface->sw ops
new OGLSurfaceToSwBlit(SurfaceType.IntArgb,
OGLSurfaceData.PF_INT_ARGB),
new OGLSurfaceToSwBlit(SurfaceType.IntArgbPre,
OGLSurfaceData.PF_INT_ARGB_PRE),
blitSurfaceToIntArgbPre,
// sw->surface ops
blitIntArgbPreToSurface,
......@@ -102,7 +105,14 @@ final class OGLBlitLoops {
CompositeType.AnyAlpha,
blitIntArgbPreToSurface),
new OGLAnyCompositeBlit(),
new OGLAnyCompositeBlit(OGLSurfaceData.OpenGLSurface,
blitSurfaceToIntArgbPre,
blitSurfaceToIntArgbPre,
blitIntArgbPreToSurface),
new OGLAnyCompositeBlit(SurfaceType.Any,
null,
blitSurfaceToIntArgbPre,
blitIntArgbPreToSurface),
new OGLSwToSurfaceScale(SurfaceType.IntRgb,
OGLSurfaceData.PF_INT_RGB),
......@@ -869,11 +879,26 @@ final class OGLGeneralTransformedBlit extends TransformBlit {
}
}
/**
* This general OGLAnyCompositeBlit implementation can convert any source/target
* surface to an intermediate surface using convertsrc/convertdst loops, applies
* necessary composite operation, and then uses convertresult loop to get the
* intermediate surface down to OpenGL.
*/
final class OGLAnyCompositeBlit extends Blit {
private WeakReference<SurfaceData> dstTmp;
private WeakReference<SurfaceData> srcTmp;
private final Blit convertsrc;
private final Blit convertdst;
private final Blit convertresult;
OGLAnyCompositeBlit() {
super(SurfaceType.Any, CompositeType.Any, OGLSurfaceData.OpenGLSurface);
OGLAnyCompositeBlit(SurfaceType srctype, Blit convertsrc, Blit convertdst,
Blit convertresult) {
super(srctype, CompositeType.Any, OGLSurfaceData.OpenGLSurface);
this.convertsrc = convertsrc;
this.convertdst = convertdst;
this.convertresult = convertresult;
}
public synchronized void Blit(SurfaceData src, SurfaceData dst,
......@@ -881,9 +906,20 @@ final class OGLAnyCompositeBlit extends Blit {
int sx, int sy, int dx, int dy,
int w, int h)
{
Blit convertdst = Blit.getFromCache(dst.getSurfaceType(),
CompositeType.SrcNoEa,
SurfaceType.IntArgbPre);
if (convertsrc != null) {
SurfaceData cachedSrc = null;
if (srcTmp != null) {
// use cached intermediate surface, if available
cachedSrc = srcTmp.get();
}
// convert source to IntArgbPre
src = convertFrom(convertsrc, src, sx, sy, w, h, cachedSrc,
BufferedImage.TYPE_INT_ARGB_PRE);
if (src != cachedSrc) {
// cache the intermediate surface
srcTmp = new WeakReference<>(src);
}
}
SurfaceData cachedDst = null;
......@@ -906,12 +942,8 @@ final class OGLAnyCompositeBlit extends Blit {
// cache the intermediate surface
dstTmp = new WeakReference(dstBuffer);
}
// now blit the buffer back to the destination
convertdst = Blit.getFromCache(dstBuffer.getSurfaceType(),
CompositeType.SrcNoEa,
dst.getSurfaceType());
convertdst.Blit(dstBuffer, dst, AlphaComposite.Src,
clip, 0, 0, dx, dy, w, h);
convertresult.Blit(dstBuffer, dst, AlphaComposite.Src, clip, 0, 0, dx,
dy, w, h);
}
}
......@@ -26,6 +26,7 @@
package sun.java2d.opengl;
import java.awt.AlphaComposite;
import java.awt.Composite;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.Transparency;
......@@ -400,8 +401,8 @@ public abstract class OGLSurfaceData extends SurfaceData
/**
* For now, we can only render LCD text if:
* - the fragment shader extension is available, and
* - blending is disabled, and
* - the source color is opaque
* - the source color is opaque, and
* - blending is SrcOverNoEa or disabled
* - and the destination is opaque
*
* Eventually, we could enhance the native OGL text rendering code
......@@ -411,9 +412,19 @@ public abstract class OGLSurfaceData extends SurfaceData
public boolean canRenderLCDText(SunGraphics2D sg2d) {
return
graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) &&
sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY &&
sg2d.surfaceData.getTransparency() == Transparency.OPAQUE &&
sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR &&
sg2d.surfaceData.getTransparency() == Transparency.OPAQUE;
(sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY ||
(sg2d.compositeState <= SunGraphics2D.COMP_ALPHA && canHandleComposite(sg2d.composite)));
}
private boolean canHandleComposite(Composite c) {
if (c instanceof AlphaComposite) {
AlphaComposite ac = (AlphaComposite)c;
return ac.getRule() == AlphaComposite.SRC_OVER && ac.getAlpha() >= 1f;
}
return false;
}
public void validatePipe(SunGraphics2D sg2d) {
......
#
# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ Die Standard-VM ist {0}
java.launcher.ergo.message2 =\ weil die Ausf\u00FChrung auf einem Server-Class-Rechner erfolgt.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -D<name>=<value>\n Legt eine Systemeigenschaft fest\n -verbose:[class|gc|jni]\n Aktiviert die Verbose-Ausgabe\n -version Druckt Produktversion und beendet das Programm\n -version:<value>\n Erfordert die angegebene Version zur Ausf\u00FChrung\n -showversion Druckt Produktversion und f\u00E4hrt fort\n -jre-restrict-search | -no-jre-restrict-search\n Bezieht private JREs des Benutzers in Versionssuche ein bzw. schlie\u00DFt sie aus\n -? -help Druckt diese Hilfemeldung\n -X Druckt Hilfe zu Nicht-Standardoptionen\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert Systemassertionen\n -dsa | -disablesystemassertions\n Deaktiviert Systemassertionen\n -agentlib:<libname>[=<options>]\n L\u00E4dt native Agent Library <libname>, z.B. -agentlib:hprof\n siehe auch -agentlib:jdwp=help und -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n L\u00E4dt native Agent Library nach vollem Pfadnamen\n -javaagent:<jarpath>[=<options>]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<imagepath>\n Zeigt Startbildschirm mit angegebenem Bild\nWeitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html
java.launcher.opt.footer =\ -cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -D<name>=<value>\n Legt eine Systemeigenschaft fest\n -verbose:[class|gc|jni]\n Aktiviert die Verbose-Ausgabe\n -version Druckt Produktversion und beendet das Programm\n -version:<value>\n Warnung: Diese Funktion ist veraltet und wird in einer\n neueren Version entfernt.\n Erfordert die angegebene Version zur Ausf\u00FChrung\n -showversion Druckt Produktversion und f\u00E4hrt fort\n -jre-restrict-search | -no-jre-restrict-search\n Warnung: Diese Funktion ist veraltet und wird in einer\n neueren Version entfernt.\n Bezieht private JREs des Benutzers in Versionssuche ein bzw. schlie\u00DFt sie aus\n -? -help Druckt diese Hilfemeldung\n -X Druckt Hilfe zu Nicht-Standardoptionen\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert Systemassertionen\n -dsa | -disablesystemassertions\n Deaktiviert Systemassertionen\n -agentlib:<libname>[=<options>]\n L\u00E4dt native Agent Library <libname>, z.B. -agentlib:hprof\n siehe auch -agentlib:jdwp=help und -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n L\u00E4dt native Agent Library nach vollem Pfadnamen\n -javaagent:<jarpath>[=<options>]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:<imagepath>\n Zeigt Startbildschirm mit angegebenem Bild\nWeitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xbootclasspath:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n Legt Suchpfad f\u00FCr Bootstrap-Klassen und Ressourcen fest\n -Xbootclasspath/a:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n H\u00E4ngt an das Ende des Bootstrap Classpath an\n -Xbootclasspath/p:<Verzeichnisse und ZIP-/JAR-Dateien durch {0} getrennt>\n Stellt Bootstrap Classpath voran\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xnoclassgc Deaktiviert Klassen-Garbage Collection\n -Xincgc Aktiviert inkrementelle Garbage Collection\n -Xloggc:<file> Loggt GC-Status in einer Datei mit Zeitstempeln\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xms<size> Legt anf\u00E4ngliche Java Heap-Gr\u00F6\u00DFe fest\n -Xmx<size> Legt maximale Java Heap-Gr\u00F6\u00DFe fest\n -Xss<size> Legt Java-Threadstackgr\u00F6\u00DFe fest\n -Xprof Gibt CPU-Profiling-Daten aus\n -Xfuture Aktiviert strengste Pr\u00FCfungen, antizipiert zuk\u00FCnftigen Standardwert\n -Xrs Reduziert Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen durch\n -Xshare:off Kein Versuch, gemeinsame Klassendaten zu verwenden\n -Xshare:auto Verwendet gemeinsame Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:on Erfordert die Verwendung gemeinsamer Klassendaten, sonst verl\u00E4uft der Vorgang nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n\nDie -X-Optionen sind keine Standardoptionen und k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ La VM por defecto es {0}
java.launcher.ergo.message2 =\ porque la ejecuci\u00F3n se est\u00E1 llevando a cabo en una m\u00E1quina de clase de servidor.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <ruta de acceso de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n -classpath <ruta de acceso de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -D<nombre>=<valor>\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida verbose\n -version imprimir la versi\u00F3n del producto y salir\n -version:<valor>\n es necesario que se ejecute la versi\u00F3n especificada\n -showversion imprimir la versi\u00F3n del producto y continuar\n -jre-restrict-search | -no-jre-restrict-search\n incluir/excluir JRE privados de usuario en la b\u00FAsqueda de versi\u00F3n\n -? -help imprimir este mensaje de ayuda\n -X imprimir la ayuda sobre las opciones que no sean est\u00E1ndar\n -ea[:<nombre_paquete>...|:<nombre_clase>]\n -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n activar afirmaciones con la granularidad especificada\n -da[:<nombre_paquete>...|:<nombre_clase>]\n -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:<nombre_bib>[=<opciones>]\n cargar la biblioteca de agente nativa <nombre_bib>, como -agentlib:hprof\n v\u00E9ase tambi\u00E9n -agentlib:jdwp=help y -agentlib:hprof=help\n -agentpath:<nombre_ruta_acceso>[=<opciones>]\n cargar biblioteca de agente nativa con el nombre de la ruta de acceso completa\n -javaagent:<ruta_acceso_jar>[=<opciones>]\n cargar agente de lenguaje de programaci\u00F3n Java, v\u00E9ase java.lang.instrument\n -splash:<ruta_acceso_imagen>\n mostrar una pantalla de presentaci\u00F3n con la imagen especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n.
java.launcher.opt.footer =\ -cp <ruta de acceso de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n -classpath <ruta de acceso de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -D<nombre>=<valor>\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida verbose\n -version imprimir la versi\u00F3n del producto y salir\n -version:<valor>\n Advertencia: Esta funci\u00F3n est\u00E1 anticuada y se eliminar\u00E1\n en una versi\u00F3n futura.\n es necesario que se ejecute la versi\u00F3n especificada\n -showversion imprimir la versi\u00F3n del producto y continuar\n -jre-restrict-search | -no-jre-restrict-search\n Advertencia: Esta funci\u00F3n est\u00E1 anticuada y se eliminar\u00E1\n en una versi\u00F3n futura.\n incluir/excluir JRE privados de usuario en la b\u00FAsqueda de versi\u00F3n\n -? -help imprimir este mensaje de ayuda\n -X imprimir la ayuda sobre las opciones que no sean est\u00E1ndar\n -ea[:<nombre_paquete>...|:<nombre_clase>]\n -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n activar afirmaciones con la granularidad especificada\n -da[:<nombre_paquete>...|:<nombre_clase>]\n -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:<nombre_bib>[=<opciones>]\n cargar la biblioteca de agente nativa <nombre_bib>, como -agentlib:hprof\n v\u00E9ase tambi\u00E9n -agentlib:jdwp=help y -agentlib:hprof=help\n -agentpath:<nombre_ruta_acceso>[=<opciones>]\n cargar biblioteca de agente nativa con el nombre de la ruta de acceso completa\n -javaagent:<ruta_acceso_jar>[=<opciones>]\n cargar agente de lenguaje de programaci\u00F3n Java, v\u00E9ase java.lang.instrument\n -splash:<ruta_acceso_imagen>\n mostrar una pantalla de presentaci\u00F3n con la imagen especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xint s\u00F3lo ejecuci\u00F3n de modo interpretado\n -Xbootclasspath:<directorios y archivos zip/jar separados por {0}>\n definir la ruta de acceso de b\u00FAsqueda para los recursos y clases de inicializaci\u00F3n de datos\n -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n agregar al final de la ruta de acceso de la clase de inicializaci\u00F3n de datos\n -Xbootclasspath/p:<directorios y archivos zip/jar separados por {0}>\n anteponer a la ruta de acceso de la clase de inicializaci\u00F3n de datos\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xincgc activar la recolecci\u00F3n de basura de clases\n -Xloggc:<archivo> registrar el estado de GC en un archivo con registros de hora\n -Xbatch desactivar compilaci\u00F3n en segundo plano\n -Xms<tama\u00F1o> definir tama\u00F1o de pila Java inicial\n -Xmx<tama\u00F1o> definir tama\u00F1o de pila Java m\u00E1ximo\n -Xss<tama\u00F1o> definir tama\u00F1o de la pila del thread de Java\n -Xprof datos de salida de creaci\u00F3n de perfil de CPU\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se emitir\u00E1 un fallo.\n -XshowSettings mostrar todos los valores y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:vm mostrar todos los valores de la VM y continuar\n -XshowSettings:properties\n mostrar todos los valores de las propiedades y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n\nLas opciones -X no son est\u00E1ndar, por lo que podr\u00EDan cambiarse sin previo aviso.\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ La machine virtuelle par d\u00E
java.launcher.ergo.message2 =\ car vous ex\u00E9cutez une machine de classe de serveur.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n Liste de r\u00E9pertoires, d''archives JAR et\n d''archives ZIP s\u00E9par\u00E9s par des {0}, dans laquelle rechercher les fichiers de classe.\n -D<name>=<value>\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version impression de la version du produit et fin de l''op\u00E9ration\n -version:<value>\n ex\u00E9cution de la version sp\u00E9cifi\u00E9e obligatoire\n -showversion impression de la version du produit et poursuite de l''op\u00E9ration\n -jre-restrict-search | -no-jre-restrict-search\n inclusion/exclusion des environnements JRE priv\u00E9s de l''utilisateur dans la recherche de version\n -? -help impression du message d''aide\n -X impression de l''aide sur les options non standard\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n activation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:<libname>[=<options>]\n chargement de la biblioth\u00E8que d''agent natif <libname>, par exemple -agentlib:hprof\n voir \u00E9galement, -agentlib:jdwp=help et -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n -javaagent:<jarpath>[=<options>]\n chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n -splash:<imagepath>\n affichage de l''\u00E9cran d''accueil avec l''image sp\u00E9cifi\u00E9e\nVoir http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails.
java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n Liste de r\u00E9pertoires, d''archives JAR et\n d''archives ZIP s\u00E9par\u00E9s par des {0}, dans laquelle rechercher les fichiers de classe.\n -D<name>=<value>\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version impression de la version du produit et fin de l''op\u00E9ration\n -version:<value>\n Avertissement : cette fonctionnalit\u00E9 est en phase d''abandon et sera enlev\u00E9e\n dans une version future.\n ex\u00E9cution de la version sp\u00E9cifi\u00E9e obligatoire\n -showversion impression de la version du produit et poursuite de l''op\u00E9ration\n -jre-restrict-search | -no-jre-restrict-search\n Avertissement : cette fonctionnalit\u00E9 est en phase d''abandon et sera enlev\u00E9e\n dans une version future.\n inclusion/exclusion des environnements JRE priv\u00E9s de l''utilisateur dans la recherche de version\n -? -help impression du message d''aide\n -X impression de l''aide sur les options non standard\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n activation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:<libname>[=<options>]\n chargement de la biblioth\u00E8que d''agent natif <libname>, par exemple -agentlib:hprof\n voir \u00E9galement, -agentlib:jdwp=help et -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n -javaagent:<jarpath>[=<options>]\n chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n -splash:<imagepath>\n affichage de l''\u00E9cran d''accueil avec l''image sp\u00E9cifi\u00E9e\nVoir http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xbootclasspath:<directories and zip/jar files separated by {0}>\n d\u00E9finition du chemin de recherche pour les ressources et classes bootstrap\n -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xbootclasspath/p:<directories and zip/jar files separated by {0}>\n ajout au d\u00E9but du chemin de classe bootstrap\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette (garbage collection) de la classe\n -Xincgc activation de l''op\u00E9ration de ramasse-miette (garbage collection) incr\u00E9mentielle\n -Xloggc:<file> journalisation du statut de l''op\u00E9ration de ramasse-miette (garbage collection) dans un fichier avec horodatages\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xms<size> d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx<size> d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xss<size> d\u00E9finition de la taille de pile de thread Java\n -Xprof sortie des donn\u00E9es de profilage de l''unit\u00E9 centrale\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n\nLes options -X ne sont pas des options standard et peuvent faire l''objet de modifications sans pr\u00E9avis.\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ La VM predefinita \u00E8 {0}
java.launcher.ergo.message2 =\ perch\u00E9 si utilizza un computer di classe server.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <classpath di ricerca di directory e file zip/jar>\n -classpath <classpath di ricerca di directory e file zip/jar>\n Una lista separata da {0} di directory, archivi JAR,\n e archivi ZIP utilizzata per la ricerca di file di classe.\n -D<nome>=<valore>\n imposta una propriet\u00E0 di sistema\n -verbose:[class|gc|jni]\n abilita l''output descrittivo\n -version stampa la versione del prodotto ed esce\n -version:<valore>\n richiede l''esecuzione della versione specificata\n -showversion stampa la versione del prodotto e continua\n -jre-restrict-search | -no-jre-restrict-search\n include/esclude gli ambienti JRE privati dell''utente nella ricerca della versione\n -? -help stampa questo messaggio della Guida\n -X stampa la Guida sulle opzioni non standard\n -ea[:<nomepackage>...|:<nomeclasse>]\n -enableassertions[:<nomepackage>...|:<nomeclasse>]\n abilita le asserzioni con la granularit\u00E0 specificata\n -da[:<nomepackage>...|:<nomeclasse>]\n -disableassertions[:<nomepackage>...|:<nomeclasse>]\n disabilita le asserzioni con la granularit\u00E0 specificata\n -esa | -enablesystemassertions\n abilita le asserzioni di sistema\n -dsa | -disablesystemassertions\n disabilita le asserzioni di sistema\n -agentlib:<nomelib>[=<opzioni>]\n carica la libreria agenti nativa <nomelib>, ad esempio -agentlib:hprof\n vedere anche, -agentlib:jdwp=help and -agentlib:hprof=help\n -agentpath:<nomepercorso>[=<opzioni>]\n carica la libreria agenti nativa con il percorso completo\n -javaagent:<percorsojar>[=<opzioni>]\n carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument\n -splash:<percorsoimmagine>\n mostra la schermata iniziale con l''immagine specificata\nPer ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html.
java.launcher.opt.footer =\ -cp <classpath di ricerca di directory e file zip/jar>\n -classpath <classpath di ricerca di directory e file zip/jar>\n Una lista separata da {0} di directory, archivi JAR,\n e archivi ZIP utilizzata per la ricerca di file di classe.\n -D<nome>=<valore>\n imposta una propriet\u00E0 di sistema\n -verbose:[class|gc|jni]\n abilita l''output descrittivo\n -version stampa la versione del prodotto ed esce\n -version:<valore>\n Attenzione: questa funzione \u00E8 obsoleta e sar\u00E0 rimossa\n in una release futura.\n -showversion stampa la versione del prodotto e continua\n -jre-restrict-search | -no-jre-restrict-search\n Attenzione: questa funzione \u00E8 obsoleta e sar\u00E0 rimossa\n in una release futura.\n -? -help stampa questo messaggio della Guida\n -X stampa la Guida sulle opzioni non standard\n -ea[:<nomepackage>...|:<nomeclasse>]\n -enableassertions[:<nomepackage>...|:<nomeclasse>]\n abilita le asserzioni con la granularit\u00E0 specificata\n -da[:<nomepackage>...|:<nomeclasse>]\n -disableassertions[:<nomepackage>...|:<nomeclasse>]\n disabilita le asserzioni con la granularit\u00E0 specificata\n -esa | -enablesystemassertions\n abilita le asserzioni di sistema\n -dsa | -disablesystemassertions\n disabilita le asserzioni di sistema\n -agentlib:<nomelib>[=<opzioni>]\n carica la libreria agenti nativa <nomelib>, ad esempio -agentlib:hprof\n vedere anche, -agentlib:jdwp=help e -agentlib:hprof=help\n -agentpath:<nomepercorso>[=<opzioni>]\n carica la libreria agenti nativa con il percorso completo\n -javaagent:<percorsojar>[=<opzioni>]\n carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument\n -splash:<percorsoimmagine>\n mostra la schermata iniziale con l''immagine specificata\nPer ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed esecuzione in modalit\u00E0 mista (impostazione predefinita)\n -Xint esecuzione solo in modalit\u00E0 convertita\n -Xbootclasspath:<directory e file zip/jar separati da {0}>\n imposta il percorso di ricerca per le classi e le risorse di bootstrap\n -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n aggiunge alla fine del classpath di bootstrap\n -Xbootclasspath/p:<directory e file zip/jar separati da {0}>\n antepone al classpath di bootstrap\n -Xdiag mostra messaggi di diagnostica aggiuntivi\n -Xnoclassgc disabilita la garbage collection della classe\n -Xincgc abilita la garbage collection incrementale\n -Xloggc:<file> registra lo stato GC in un file di log con indicatori orari\n -Xbatch disabilita la compilazione in background\n -Xms<dimensione> imposta la dimensione heap Java iniziale\n -Xmx<dimensione> imposta la dimensione heap Java massima\n -Xss<dimensione> imposta la dimensione dello stack di thread Java\n -Xprof visualizza i dati di profilo della CPU\n -Xfuture abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future\n -Xrs riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione)\n -Xcheck:jni esegue controlli aggiuntivi per le funzioni JNI\n -Xshare:off non tenta di utilizzare i dati della classe condivisi\n -Xshare:auto utilizza i dati di classe condivisi se possibile (impostazione predefinita)\n -Xshare:on richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings mostra tutte le impostazioni e continua\n -XshowSettings:all\n mostra tutte le impostazioni e continua\n -XshowSettings:vm mostra tutte le impostazioni correlate alla VM e continua\n -XshowSettings:properties\n mostra tutte le impostazioni delle propriet\u00E0 e continua\n -XshowSettings:locale\n mostra tutte le impostazioni correlate alle impostazioni nazionali e continua\n\nLe opzioni -X non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,8 @@ java.launcher.ergo.message1 =\ \u30C7\u30D5\u30A9\u30EB\u30C8V
java.launcher.ergo.message2 =\ \u3053\u308C\u306F\u30B5\u30FC\u30D0\u30FC\u30AF\u30E9\u30B9\u306E\u30DE\u30B7\u30F3\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u305F\u3081\u3067\u3059\u3002\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3067\u3059\u3002\n -D<name>=<value>\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n -version:<value>\n \u6307\u5B9A\u3057\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5B9F\u884C\u306B\u5FC5\u9808\u306B\u3059\u308B\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -jre-restrict-search | -no-jre-restrict-search\n \u30E6\u30FC\u30B6\u30FC\u306E\u30D7\u30E9\u30A4\u30D9\u30FC\u30C8JRE\u3092\u30D0\u30FC\u30B8\u30E7\u30F3\u691C\u7D22\u306B\u542B\u3081\u308B/\u9664\u5916\u3059\u308B\n -? -help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n -X \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:<libname>[=<options>]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:hprof\n -agentlib:jdwp=help\u3068-agentlib:hprof=help\u3082\u53C2\u7167\n -agentpath:<pathname>[=<options>]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:<jarpath>[=<options>]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:<imagepath>\n \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n\u8A73\u7D30\u306Fhttp://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3067\u3059\u3002\n -D<name>=<value>\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n -version:<value>\n \u8B66\u544A: \u3053\u306E\u6A5F\u80FD\u306F\u975E\u63A8\u5968\u3067\u3042\u308A\u3001\u8A73\u7D30\u306E\u30EA\u30EA\u30FC\u30B9\u3067\n \u5EC3\u6B62\u3055\u308C\u307E\u3059\u3002\n \u6307\u5B9A\u3057\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5B9F\u884C\u306B\u5FC5\u9808\u306B\u3059\u308B\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -jre-restrict-search | -no-jre-restrict-search\n \u8B66\u544A: \u3053\u306E\u6A5F\u80FD\u306F\u975E\u63A8\u5968\u3067\u3042\u308A\u3001\u8A73\u7D30\u306E\u30EA\u30EA\u30FC\u30B9\u3067\n \u5EC3\u6B62\u3055\u308C\u307E\u3059\u3002\n \u30E6\u30FC\u30B6\u30FC\u306E\u30D7\u30E9\u30A4\u30D9\u30FC\u30C8JRE\u3092\u30D0\u30FC\u30B8\u30E7\u30F3\u691C\u7D22\u306B\u542B\u3081\u308B/\u9664\u5916\u3059\u308B\n -? -help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n -X \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:<libname>[=<options>]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:hprof\n -agentlib:jdwp=help\u3068-agentlib:hprof=help\u3082\u53C2\u7167\n -agentpath:<pathname>[=<options>]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:<jarpath>[=<options>]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:<imagepath>\n \
\u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n\u8A73\u7D30\u306Fhttp://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xbootclasspath:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u306E\u30AF\u30E9\u30B9\u3068\u30EA\u30BD\u30FC\u30B9\u306E\u691C\u7D22\u30D1\u30B9\u3092\u8A2D\u5B9A\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xbootclasspath/p:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u524D\u306B\u4ED8\u52A0\u3059\u308B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xincgc \u5897\u5206\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xloggc:<file> \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xms<size> Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx<size> Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xss<size> Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ \uAE30\uBCF8 VM\uC740 {0}\uC785
java.launcher.ergo.message2 =\ \uC11C\uBC84\uAE09 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC2E4\uD589 \uC911\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -D<name>=<value>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -version:<value>\n \uC2E4\uD589\uD560 \uBC84\uC804\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -jre-restrict-search | -no-jre-restrict-search\n \uBC84\uC804 \uAC80\uC0C9\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uC804\uC6A9 JRE\uB97C \uD3EC\uD568/\uC81C\uC678\uD569\uB2C8\uB2E4.\n -? -help \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<libname>[=<options>]\n <libname> \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:hprof).\n -agentlib:jdwp=help \uBC0F -agentlib:hprof=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<pathname>[=<options>]\n \uC804\uCCB4 \uACBD\uB85C\uBA85\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:<jarpath>[=<options>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<imagepath>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -D<name>=<value>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -version:<value>\n \uACBD\uACE0: \uC774 \uAE30\uB2A5\uC740 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBA70\n \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n \uC2E4\uD589\uD560 \uBC84\uC804\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -jre-restrict-search | -no-jre-restrict-search\n \uACBD\uACE0: \uC774 \uAE30\uB2A5\uC740 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBA70\n \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n \uBC84\uC804 \uAC80\uC0C9\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uC804\uC6A9 JRE\uB97C \uD3EC\uD568/\uC81C\uC678\uD569\uB2C8\uB2E4.\n -? -help \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<libname>[=<options>]\n <libname> \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:hprof).\n -agentlib:jdwp=help \uBC0F -agentlib:hprof=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<pathname>[=<options>]\n \uC804\uCCB4 \uACBD\uB85C\uBA85\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:<jarpath>[=<options>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<imagepath>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xbootclasspath:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uBC0F \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uAC80\uC0C9 \uACBD\uB85C\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xbootclasspath/p:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uC55E\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xincgc \uC99D\uBD84\uC801\uC778 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xloggc:<file> \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms<size> \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx<size> \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xss<size> Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n\n-X \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \
......
#
# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ A VM padr\u00E3o \u00E9 {0}
java.launcher.ergo.message2 =\ porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n Uma lista separada por {0} de diret\u00F3rios, archives JAR\n e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n -D<nome>=<valor>\n define uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativa a sa\u00EDda detalhada\n -version imprime a vers\u00E3o do produto e sai do programa\n -version:<valor>\n requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n -showversion imprime a vers\u00E3o do produto e continua\n -jre-restrict-search | -no-jre-restrict-search\n inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n -? -help imprime esta mensagem de ajuda\n -X imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n -ea[:<nome do pacote>...|:<nome da classe>]\n -enableassertions[:<nome do pacote>...|:<nome da classe>]\n ativa asser\u00E7\u00F5es com granularidade especificada\n -da[:<nome do pacote>...|:<nome da classe>]\n -disableassertions[:<nome do pacote>...|:<nome da classe>]\n desativa asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativa asser\u00E7\u00F5es do sistema\n -dsa | -disablesystemassertions\n desativa asser\u00E7\u00F5es do sistema\n -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n carrega a biblioteca de agentes nativa com base no nome do caminho completo\n -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n -splash:<caminho da imagem>\n mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
java.launcher.opt.footer =\ -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e arquivos compactados ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n -D<nome>=<valor>\n define uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativa a sa\u00EDda detalhada\n -version imprime a vers\u00E3o do produto e sai do programa\n -version:<valor>\n Advert\u00EAncia: esta funcionalidade est\u00E1 obsoleta e ser\u00E1 removida\n em uma release futura.\n requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n -showversion imprime a vers\u00E3o do produto e continua\n -jre-restrict-search | -no-jre-restrict-search\n Advert\u00EAncia: esta funcionalidade est\u00E1 obsoleta e ser\u00E1 removida\n em uma release futura.\n inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n -? -help imprime esta mensagem de ajuda\n -X imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n -ea[:<nome do pacote>...|:<nome da classe>]\n -enableassertions[:<nome do pacote>...|:<nome da classe>]\n ativa asser\u00E7\u00F5es com granularidade especificada\n -da[:<nome do pacote>...|:<nome da classe>]\n -disableassertions[:<nome do pacote>...|:<nome da classe>]\n desativa asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativa asser\u00E7\u00F5es do sistema\n -dsa | -disablesystemassertions\n desativa asser\u00E7\u00F5es do sistema\n -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n carrega a biblioteca de agentes nativa com base no nome do caminho completo\n -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n -splash:<caminho da imagem>\n mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed execu\u00E7\u00E3o no modo misto (padr\u00E3o)\n -Xint execu\u00E7\u00E3o somente no modo interpretado\n -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n -Xbootclasspath/p:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n -Xdiag mostra mensagens de diagn\u00F3stico adicionais\n -Xnoclassgc desativa a coleta de lixo da classe\n -Xincgc ativa a coleta de lixo incremental\n -Xloggc:<arquivo> registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n -Xbatch desativa a compila\u00E7\u00E3o em segundo plano\n -Xms<tamanho> define o tamanho inicial do heap Java\n -Xmx<tamanho> define o tamanho m\u00E1ximo do heap Java\n -Xss<tamanho> define o tamanho da pilha de threads java\n -Xprof produz dados de perfil da cpu\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor padr\u00E3o futuro\n -Xrs reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n -Xshare:off n\u00E3o tenta usar dados da classe compartilhada\n -Xshare:auto se poss\u00EDvel, usa dados da classe compartilhada (padr\u00E3o)\n -Xshare:on requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es da propriedade e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ Standard-VM \u00E4r {0}
java.launcher.ergo.message2 =\ eftersom du k\u00F6r en serverklassmaskin.\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <klass\u00F6kv\u00E4g f\u00F6r kataloger och zip-/jar-filer>\n -classpath <klass\u00F6kv\u00E4g f\u00F6r kataloger och zip-/jar-filer>\n En {0}-separerad lista med kataloger, JAR-arkiv,\n och ZIP-arkiv f\u00F6r s\u00F6kning efter klassfiler.\n -D<name>=<value>\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversionen och avsluta\n -version:<value>\n beg\u00E4r den specifika versionen som ska k\u00F6ras\n -showversion skriv ut produktversionen och forts\u00E4tt\n -jre-restrict-search | -no-jre-restrict-search\n inkludera/exkludera anv\u00E4ndarprivata JRE:er i versions\u00F6kningen\n -? -help skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n aktivera verifiering med angiven detaljgrad\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n avaktivera verifiering med angiven detaljgrad\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:<libname>[=<options>]\n ladda ursprungligt agentbibliotek <libname>, e.g. -agentlib:hprof\n se \u00E4ven -agentlib:jdwp=help och -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n ladda ursprungligt agentbibliotek med helt s\u00F6kv\u00E4gsnamn\n -javaagent:<jarpath>[=<options>]\n ladda Java-programspr\u00E5ksagent, se java.lang.instrument\n -splash:<imagepath>\n visa v\u00E4lkomstsk\u00E4rm med angiven bild\nMer information finns p\u00E5 http://www.oracle.com/technetwork/java/javase/documentation/index.html.
java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n En lista \u00F6ver kataloger, JAR-arkiv och och ZIP-arkiv\n f\u00F6r s\u00F6kning efter klassfiler avgr\u00E4nsad med {0}.\n -D<name>=<value>\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion och avsluta\n -version:<value>\n Varning: den h\u00E4r funktionen \u00E4r inaktuell och kommer\n att tas bort i en framtida utg\u00E5va.\n kr\u00E4v den angivna versionen f\u00F6r att k\u00F6ra\n -showversion skriv ut produktversion och forts\u00E4tt\n -jre-restrict-search | -no-jre-restrict-search\n Varning: den h\u00E4r funktionen \u00E4r inaktuell och kommer\n att tas bort i en framtida utg\u00E5va.\n inkludera/exkludera anv\u00E4ndarprivata JRE:er i versionss\u00F6kningen\n -? -help skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n aktivera verifieringar med den angivna detaljgraden\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:<libname>[=<options>]\n ladda det ursprungliga agentbiblioteket <libname>, t.ex. -agentlib:hprof\n se \u00E4ven -agentlib:jdwp=help och -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n ladda det ursprungliga agentbiblioteket med det fullst\u00E4ndiga s\u00F6kv\u00E4gsnamnet\n -javaagent:<jarpath>[=<options>]\n ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n -splash:<imagepath>\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\nMer information finns p\u00E5 http://www.oracle.com/technetwork/java/javase/documentation/index.html.
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed k\u00F6rning i blandat l\u00E4ge (standard)\n -Xint endast k\u00F6rning i tolkat l\u00E4ge\n -Xbootclasspath:<kataloger och zip-/jar-filer avgr\u00E4nsas med {0}>\n ange s\u00F6kv\u00E4g f\u00F6r programladdningsklasser och -resurser\n -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsas med {0}>\n l\u00E4gg till i slutet av programladdningsklassens s\u00F6kv\u00E4g\n -Xbootclasspath/p:<kataloger och zip-/jar-filer avgr\u00E4nsas med {0}>\n l\u00E4gg till i b\u00F6rjan av programladdningsklassens s\u00F6kv\u00E4g\n -Xdiag visa ytterligare diagnostiska meddelanden\n -Xnoclassgc avaktivera klassens skr\u00E4pinsamling\n -Xincgc aktivera inkrementell skr\u00E4pinsamling\n -Xloggc:<fil> logga GC-status till en fil med tidsst\u00E4mplar\n -Xbatch avaktivera bakgrundskompilering\n -Xms<storlek> ange ursprunglig storlek f\u00F6r Java-heap\n -Xmx<storlek> ange maximal storlek f\u00F6r Java-heap\n -Xss<storlek> ange storlek f\u00F6r java-tr\u00E5dsstack\n -Xprof utdata f\u00F6r processorprofilering\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xrs minska OS-signalanv\u00E4ndning av Java/VM (se dokumentation)\n -Xcheck:jni utf\u00F6r ytterligare kontroller f\u00F6r JNI-funktioner\n -Xshare:off anv\u00E4nd inte delade klassdata\n -Xshare:auto anv\u00E4nd delade klassdata om det g\u00E5r (standard)\n -Xshare:on kr\u00E4v att delade klassdata anv\u00E4nds, annars slutf\u00F6r inte.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5krelaterade inst\u00E4llningar och forts\u00E4tt\n\n-X-alternativen \u00E4r inte standard och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
......@@ -42,7 +42,7 @@ java.launcher.X.usage=\ -Xmixed k\u00F6rning i blandat l\u00E4ge (s
# Translators please note do not translate the options themselves
java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r specifika f\u00F6r Mac OS X:\n -XstartOnFirstThread\n k\u00F6r huvudmetoden() p\u00E5 den f\u00F6rsta (AppKit) tr\u00E5den\n -Xdock:name=<application name>"\n \u00E5sidosatt standardapplikationsnamn visas i docka\n -Xdock:icon=<path to icon file>\n \u00E5sidosatt standardikon visas i docka\n\n
java.launcher.cls.error1=Fel: Hittar inte eller kan inte ladda huvudklassen {0}
java.launcher.cls.error1=Fel: Kan inte hitta eller kan inte ladda huvudklassen {0}
java.launcher.cls.error2=Fel: Huvudmetoden \u00E4r inte {0} i klassen {1}, definiera huvudmetoden som:\n public static void main(String[] args)
java.launcher.cls.error3=Fel: Huvudmetoden m\u00E5ste returnera ett v\u00E4rde av typen void i klassen {0}, \ndefiniera huvudmetoden som:\n public static void main(String[] args)
java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n public static void main(String[] args)\neller s\u00E5 m\u00E5ste en JavaFX-applikationsklass ut\u00F6ka {1}
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ \u9ED8\u8BA4 VM \u662F {0}
java.launcher.ergo.message2 =\ \u56E0\u4E3A\u60A8\u662F\u5728\u670D\u52A1\u5668\u7C7B\u8BA1\u7B97\u673A\u4E0A\u8FD0\u884C\u3002\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n -version:<\u503C>\n \u9700\u8981\u6307\u5B9A\u7684\u7248\u672C\u624D\u80FD\u8FD0\u884C\n -showversion \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n -jre-restrict-search | -no-jre-restrict-search\n \u5728\u7248\u672C\u641C\u7D22\u4E2D\u5305\u62EC/\u6392\u9664\u7528\u6237\u4E13\u7528 JRE\n -? -help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n -X \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u7981\u7528\u5177\u6709\u6307\u5B9A\u7C92\u5EA6\u7684\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<libname>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <libname>, \u4F8B\u5982 -agentlib:hprof\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help \u548C -agentlib:hprof=help\n -agentpath:<pathname>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:<jarpath>[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<imagepath>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002
java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u5217\u8868, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n -version:<\u503C>\n \u8B66\u544A: \u6B64\u529F\u80FD\u5DF2\u8FC7\u65F6, \u5C06\u5728\n \u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n \u9700\u8981\u6307\u5B9A\u7684\u7248\u672C\u624D\u80FD\u8FD0\u884C\n -showversion \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n -jre-restrict-search | -no-jre-restrict-search\n \u8B66\u544A: \u6B64\u529F\u80FD\u5DF2\u8FC7\u65F6, \u5C06\u5728\n \u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u3002\n \u5728\u7248\u672C\u641C\u7D22\u4E2D\u5305\u62EC/\u6392\u9664\u7528\u6237\u4E13\u7528 JRE\n -? -help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n -X \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u7981\u7528\u5177\u6709\u6307\u5B9A\u7C92\u5EA6\u7684\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<libname>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <libname>, \u4F8B\u5982 -agentlib:hprof\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help \u548C -agentlib:hprof=help\n -agentpath:<pathname>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:<jarpath>[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<imagepath>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4)\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xbootclasspath:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u8BBE\u7F6E\u641C\u7D22\u8DEF\u5F84\u4EE5\u5F15\u5BFC\u7C7B\u548C\u8D44\u6E90\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xbootclasspath/p:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u7F6E\u4E8E\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u4E4B\u524D\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xincgc \u542F\u7528\u589E\u91CF\u5783\u573E\u6536\u96C6\n -Xloggc:<file> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xms<size> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<size> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xss<size> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xprof \u8F93\u51FA cpu \u914D\u7F6E\u6587\u4EF6\u6570\u636E\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4)\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n\n-X \u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
......
#
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -34,7 +34,7 @@ java.launcher.ergo.message1 =\ \u9810\u8A2D\u7684 VM \u70BA {0
java.launcher.ergo.message2 =\ \u56E0\u70BA\u60A8\u6B63\u5728\u4F3A\u670D\u5668\u985E\u5225\u6A5F\u5668\u4E0A\u57F7\u884C\u3002\n
# Translators please note do not translate the options themselves
java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n \u4F7F\u7528 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n ZIP \u5B58\u6A94\u6E05\u55AE\u4F86\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n -D<name>=<value>\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -version:<value>\n \u9700\u8981\u6307\u5B9A\u7684\u7248\u672C\u624D\u80FD\u57F7\u884C\n -showversion \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -jre-restrict-search | -no-jre-restrict-search\n \u5728\u7248\u672C\u641C\u5C0B\u4E2D\u5305\u62EC/\u6392\u9664\u4F7F\u7528\u8005\u5C08\u7528 JRE\n -? -help \u5217\u5370\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u555F\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u505C\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:<libname>[=<options>]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:hprof\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help \u8207 -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:<jarpath>[=<options>]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:<imagepath>\n \u986F\u793A\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n\u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002
java.launcher.opt.footer =\ -cp <class search path of directories and zip/jar files>\n -classpath <class search path of directories and zip/jar files>\n \u4F7F\u7528 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n ZIP \u5B58\u6A94\u6E05\u55AE\u4F86\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n -D<name>=<value>\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -version:<value>\n \u8B66\u544A: \u6B64\u529F\u80FD\u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u6703\u5F9E\n \u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\u3002\n \u9700\u8981\u6307\u5B9A\u7684\u7248\u672C\u624D\u80FD\u57F7\u884C\n -showversion \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -jre-restrict-search | -no-jre-restrict-search\n \u8B66\u544A: \u6B64\u529F\u80FD\u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u6703\u5F9E\n \u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\u3002\n \u5728\u7248\u672C\u641C\u5C0B\u4E2D\u5305\u62EC/\u6392\u9664\u4F7F\u7528\u8005\u5C08\u7528 JRE\n -? -help \u5217\u5370\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n -ea[:<packagename>...|:<classname>]\n -enableassertions[:<packagename>...|:<classname>]\n \u555F\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:<packagename>...|:<classname>]\n -disableassertions[:<packagename>...|:<classname>]\n \u505C\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:<libname>[=<options>]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:hprof\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help \u8207 -agentlib:hprof=help\n -agentpath:<pathname>[=<options>]\n \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:<jarpath>[=<options>]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:<imagepath>\n \u986F\u793A\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n\u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002
# Translators please note do not translate the options themselves
java.launcher.X.usage=\ -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xbootclasspath:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n \u8A2D\u5B9A\u555F\u52D5\u5B89\u88DD\u985E\u5225\u548C\u8CC7\u6E90\u7684\u641C\u5C0B\u8DEF\u5F91\n -Xbootclasspath/a:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n \u9644\u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xbootclasspath/p:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n \u9644\u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u524D\u9762\n -Xdiag \u986F\u793A\u5176\u4ED6\u7684\u8A3A\u65B7\u8A0A\u606F\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xincgc \u555F\u7528\u6F38\u9032\u8CC7\u6E90\u56DE\u6536\n -Xloggc:<file> \u5229\u7528\u6642\u6233\u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E2D\n -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xms<size> \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx<size> \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xss<size> \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xprof \u8F38\u51FA CPU \u5206\u6790\u8CC7\u6599\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xcheck:jni \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:auto \u5118\u53EF\u80FD\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n\n -X \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
......
#
#
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ agent.err.agentclass.failed = Administrationsagentklassen utf\u00F6rdes i
agent.err.premain.notfound = premain(String) finns inte i agentklassen
agent.err.agentclass.access.denied = \u00C5tkomst till premain(String) nekad
agent.err.invalid.agentclass = Ogiltigt egenskapsv\u00E4rde f\u00F6r com.sun.management.agent.class
agent.err.invalid.state = Ogiltig agentstatus
agent.err.invalid.state = Ogiltigt agenttillst\u00E5nd
agent.err.invalid.jmxremote.port = Ogiltigt com.sun.management.jmxremote.port-nummer
agent.err.invalid.jmxremote.rmi.port = Ogiltigt com.sun.management.jmxremote.rmi.port-nummer
......
......@@ -377,7 +377,6 @@ public class HKSCS {
dst[dp++] = repl[1];
continue;
}
sp++;
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
dst[dp++] = (byte)(bb >> 8);
......
......@@ -28,7 +28,7 @@ dialog.printtofile=Skriv till fil
dialog.noprintermsg=Hittade ingen utskriftstj\u00E4nst.
dialog.writeerror=Kan inte skriva till filen:
#
label.info=Information:
label.info=Info:
label.jobname=&Utskrift:
label.numcopies=Antal e&xemplar:
label.priority=P&rioritet:
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -101,7 +101,7 @@ public class Resources_sv extends java.util.ListResourceBundle {
{"Principals", "Identitetshavare"},
{".Edit.Principal.", " Redigera identitetshavare:"},
{".Add.New.Principal.", " L\u00E4gg till ny identitetshavare:"},
{"Permissions", "Beh\u00F6righet"},
{"Permissions", "Beh\u00F6righeter"},
{".Edit.Permission.", " Redigera beh\u00F6righet:"},
{".Add.New.Permission.", " L\u00E4gg till ny beh\u00F6righet:"},
{"Signed.By.", "Signerad av:"},
......
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -117,7 +117,7 @@ public class AuthResources_sv extends java.util.ListResourceBundle {
{"only.Principal.based.grant.entries.permitted",
"endast identitetshavarbaserade poster till\u00E5ts"},
{"expected.permission.entry", "f\u00F6rv\u00E4ntade beh\u00F6righetspost"},
{"number.", "antal "},
{"number.", "nummer"},
{"expected.expect.read.end.of.file.",
"f\u00F6rv\u00E4ntade {0}, l\u00E4ste filslut"},
{"expected.read.end.of.file", "f\u00F6rv\u00E4ntade ';', l\u00E4ste filslut"},
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -135,7 +135,7 @@ public class Resources_sv extends java.util.ListResourceBundle {
{"expected.codeBase.or.SignedBy.or.Principal",
"f\u00F6rv\u00E4ntad codeBase eller SignedBy eller identitetshavare"},
{"expected.permission.entry", "f\u00F6rv\u00E4ntade beh\u00F6righetspost"},
{"number.", "antal "},
{"number.", "nummer"},
{"expected.expect.read.end.of.file.",
"f\u00F6rv\u00E4ntade [{0}], l\u00E4ste [filslut]"},
{"expected.read.end.of.file.",
......
......@@ -515,6 +515,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
/// Sets the font, hints, according to the set parameters
private void setParams( Graphics2D g2 ) {
System.out.println("USING FONT " + testFont + " "+testFont.getPSName());
g2.setFont( testFont );
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, antiAliasType);
g2.setRenderingHint(KEY_FRACTIONALMETRICS, fractionalMetricsType);
......
......@@ -411,7 +411,6 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative(
jobject metrics;
jfloat ax, ay, dx, dy, bx, by, lx, ly, mx, my;
jfloat f0 = 0.0;
FT_Pos bmodifier = 0;
FTScalerContext *context =
(FTScalerContext*) jlong_to_ptr(pScalerContext);
FTScalerInfo *scalerInfo =
......@@ -444,43 +443,38 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative(
So, we have to do adust them explicitly and stay consistent with what
freetype does to outlines. */
/* For bolding glyphs are not just widened. Height is also changed
(see ftsynth.c).
TODO: In vertical direction we could do better job and adjust metrics
proportionally to glyoh shape. */
if (context->doBold) {
bmodifier = FT_MulFix(
scalerInfo->face->units_per_EM,
scalerInfo->face->size->metrics.y_scale)/24;
}
/**** Note: only some metrics are affected by styling ***/
/* See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657854 */
#define FT_MulFixFloatShift6(a, b) (((float) (a)) * ((float) (b)) / 65536.0 / 64.0)
/*
* See FreeType source code: src/base/ftobjs.c ft_recompute_scaled_metrics()
* http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1659
*/
/* ascent */
ax = 0;
ay = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
((jlong) scalerInfo->face->ascender + bmodifier/2),
ay = -(jfloat) (FT_MulFixFloatShift6(
((jlong) scalerInfo->face->ascender),
(jlong) scalerInfo->face->size->metrics.y_scale));
/* descent */
dx = 0;
dy = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
((jlong) scalerInfo->face->descender + bmodifier/2),
dy = -(jfloat) (FT_MulFixFloatShift6(
((jlong) scalerInfo->face->descender),
(jlong) scalerInfo->face->size->metrics.y_scale));
/* baseline */
bx = by = 0;
/* leading */
lx = 0;
ly = (jfloat) FT26Dot6ToFloat(FT_MulFix(
(jlong) scalerInfo->face->height + bmodifier,
ly = (jfloat) (FT_MulFixFloatShift6(
(jlong) scalerInfo->face->height,
(jlong) scalerInfo->face->size->metrics.y_scale))
+ ay - dy;
/* max advance */
mx = (jfloat) FT26Dot6ToFloat(
scalerInfo->face->size->metrics.max_advance +
2*bmodifier +
OBLIQUE_MODIFIER(scalerInfo->face->size->metrics.height));
my = 0;
......
......@@ -260,7 +260,9 @@ cmsBool _MultiplyMatrix(cmsPipeline* Lut)
cmsStage* Multmat = cmsStageAllocMatrix(Lut->ContextID, 3, 3, (const cmsFloat64Number*) &res, NULL);
// Recover the chain
if (Multmat != NULL) {
Multmat->Next = chain;
}
*pt1 = Multmat;
}
......
......@@ -748,7 +748,7 @@ OGLContext_IsLCDShaderSupportAvailable(JNIEnv *env,
// finally, check to see if the hardware supports the required number
// of texture units
j2d_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &maxTexUnits);
if (maxTexUnits < 4) {
if (maxTexUnits < 2) {
J2dRlsTraceLn1(J2D_TRACE_INFO,
"OGLContext_IsLCDShaderSupportAvailable: not enough tex units (%d)",
maxTexUnits);
......
......@@ -94,23 +94,10 @@ static GlyphCacheInfo *glyphCache = NULL;
*/
static GLhandleARB lcdTextProgram = 0;
/**
* The size of one of the gamma LUT textures in any one dimension along
* the edge, in texels.
*/
#define LUT_EDGE 16
/**
* These are the texture object handles for the gamma and inverse gamma
* lookup tables.
*/
static GLuint gammaLutTextureID = 0;
static GLuint invGammaLutTextureID = 0;
/**
* This value tracks the previous LCD contrast setting, so if the contrast
* value hasn't changed since the last time the lookup tables were
* generated (not very common), then we can skip updating the tables.
* value hasn't changed since the last time the gamma uniforms were
* updated (not very common), then we can skip updating the unforms.
*/
static jint lastLCDContrast = -1;
......@@ -275,12 +262,9 @@ OGLTR_AddToGlyphCache(GlyphInfo *glyph, jboolean rgbOrder)
* changes, we will modify the "src_adj" value in OGLTR_UpdateLCDTextColor()).
*
* The "main" function is executed for each "fragment" (or pixel) in the
* glyph image. We have determined that the pow() function can be quite
* slow and it only operates on scalar values, not vectors as we require.
* So instead we build two 3D textures containing gamma (and inverse gamma)
* lookup tables that allow us to approximate a component-wise pow() function
* with a single 3D texture lookup. This approach is at least 2x faster
* than the equivalent pow() calls.
* glyph image. The pow() routine operates on vectors, gives precise results,
* and provides acceptable level of performance, so we use it to perform
* the gamma adjustment.
*
* The variables involved in the equation can be expressed as follows:
*
......@@ -299,8 +283,8 @@ static const char *lcdTextShaderSource =
"uniform vec3 src_adj;"
"uniform sampler2D glyph_tex;"
"uniform sampler2D dst_tex;"
"uniform sampler3D invgamma_tex;"
"uniform sampler3D gamma_tex;"
"uniform vec3 gamma;"
"uniform vec3 invgamma;"
""
"void main(void)"
"{"
......@@ -312,12 +296,12 @@ static const char *lcdTextShaderSource =
" }"
// load the RGB value from the corresponding destination pixel
" vec3 dst_clr = vec3(texture2D(dst_tex, gl_TexCoord[1].st));"
// gamma adjust the dest color using the invgamma LUT
" vec3 dst_adj = vec3(texture3D(invgamma_tex, dst_clr.stp));"
// gamma adjust the dest color
" vec3 dst_adj = pow(dst_clr.rgb, gamma);"
// linearly interpolate the three color values
" vec3 result = mix(dst_adj, src_adj, glyph_clr);"
// gamma re-adjust the resulting color (alpha is always set to 1.0)
" gl_FragColor = vec4(vec3(texture3D(gamma_tex, result.stp)), 1.0);"
" gl_FragColor = vec4(pow(result.rgb, invgamma), 1.0);"
"}";
/**
......@@ -348,10 +332,6 @@ OGLTR_CreateLCDTextProgram()
j2d_glUniform1iARB(loc, 0); // texture unit 0
loc = j2d_glGetUniformLocationARB(lcdTextProgram, "dst_tex");
j2d_glUniform1iARB(loc, 1); // texture unit 1
loc = j2d_glGetUniformLocationARB(lcdTextProgram, "invgamma_tex");
j2d_glUniform1iARB(loc, 2); // texture unit 2
loc = j2d_glGetUniformLocationARB(lcdTextProgram, "gamma_tex");
j2d_glUniform1iARB(loc, 3); // texture unit 3
// "unuse" the program object; it will be re-bound later as needed
j2d_glUseProgramObjectARB(0);
......@@ -360,108 +340,26 @@ OGLTR_CreateLCDTextProgram()
}
/**
* Initializes a 3D texture object for use as a three-dimensional gamma
* lookup table. Note that the wrap mode is initialized to GL_LINEAR so
* that the table will interpolate adjacent values when the index falls
* somewhere in between.
*/
static GLuint
OGLTR_InitGammaLutTexture()
{
GLuint lutTextureID;
j2d_glGenTextures(1, &lutTextureID);
j2d_glBindTexture(GL_TEXTURE_3D, lutTextureID);
j2d_glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
j2d_glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
j2d_glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
j2d_glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
j2d_glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
return lutTextureID;
}
/**
* Updates the lookup table in the given texture object with the float
* values in the given system memory buffer. Note that we could use
* glTexSubImage3D() when updating the texture after its first
* initialization, but since we're updating the entire table (with
* power-of-two dimensions) and this is a relatively rare event, we'll
* just stick with glTexImage3D().
*/
static void
OGLTR_UpdateGammaLutTexture(GLuint texID, GLfloat *lut, jint size)
{
j2d_glBindTexture(GL_TEXTURE_3D, texID);
j2d_glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB8,
size, size, size, 0, GL_RGB, GL_FLOAT, lut);
}
/**
* (Re)Initializes the gamma lookup table textures.
* (Re)Initializes the gamma related uniforms.
*
* The given contrast value is an int in the range [100, 250] which we will
* then scale to fit in the range [1.0, 2.5]. We create two LUTs, one
* that essentially calculates pow(x, gamma) and the other calculates
* pow(x, 1/gamma). These values are replicated in all three dimensions, so
* given a single 3D texture coordinate (typically this will be a triplet
* in the form (r,g,b)), the 3D texture lookup will return an RGB triplet:
*
* (pow(r,g), pow(y,g), pow(z,g)
*
* where g is either gamma or 1/gamma, depending on the table.
* then scale to fit in the range [1.0, 2.5].
*/
static jboolean
OGLTR_UpdateLCDTextContrast(jint contrast)
{
double gamma = ((double)contrast) / 100.0;
double ig = gamma;
double g = 1.0 / ig;
GLfloat lut[LUT_EDGE][LUT_EDGE][LUT_EDGE][3];
GLfloat invlut[LUT_EDGE][LUT_EDGE][LUT_EDGE][3];
int min = 0;
int max = LUT_EDGE - 1;
int x, y, z;
double g = ((double)contrast) / 100.0;
double ig = 1.0 / g;
GLint loc;
J2dTraceLn1(J2D_TRACE_INFO,
"OGLTR_UpdateLCDTextContrast: contrast=%d", contrast);
for (z = min; z <= max; z++) {
double zval = ((double)z) / max;
GLfloat gz = (GLfloat)pow(zval, g);
GLfloat igz = (GLfloat)pow(zval, ig);
for (y = min; y <= max; y++) {
double yval = ((double)y) / max;
GLfloat gy = (GLfloat)pow(yval, g);
GLfloat igy = (GLfloat)pow(yval, ig);
loc = j2d_glGetUniformLocationARB(lcdTextProgram, "gamma");
j2d_glUniform3fARB(loc, g, g, g);
for (x = min; x <= max; x++) {
double xval = ((double)x) / max;
GLfloat gx = (GLfloat)pow(xval, g);
GLfloat igx = (GLfloat)pow(xval, ig);
lut[z][y][x][0] = gx;
lut[z][y][x][1] = gy;
lut[z][y][x][2] = gz;
invlut[z][y][x][0] = igx;
invlut[z][y][x][1] = igy;
invlut[z][y][x][2] = igz;
}
}
}
if (gammaLutTextureID == 0) {
gammaLutTextureID = OGLTR_InitGammaLutTexture();
}
OGLTR_UpdateGammaLutTexture(gammaLutTextureID, (GLfloat *)lut, LUT_EDGE);
if (invGammaLutTextureID == 0) {
invGammaLutTextureID = OGLTR_InitGammaLutTexture();
}
OGLTR_UpdateGammaLutTexture(invGammaLutTextureID,
(GLfloat *)invlut, LUT_EDGE);
loc = j2d_glGetUniformLocationARB(lcdTextProgram, "invgamma");
j2d_glUniform3fARB(loc, ig, ig, ig);
return JNI_TRUE;
}
......@@ -562,14 +460,6 @@ OGLTR_EnableLCDGlyphModeState(GLuint glyphTextureID, jint contrast)
return JNI_FALSE;
}
// bind the gamma LUT textures
j2d_glActiveTextureARB(GL_TEXTURE2_ARB);
j2d_glBindTexture(GL_TEXTURE_3D, invGammaLutTextureID);
j2d_glEnable(GL_TEXTURE_3D);
j2d_glActiveTextureARB(GL_TEXTURE3_ARB);
j2d_glBindTexture(GL_TEXTURE_3D, gammaLutTextureID);
j2d_glEnable(GL_TEXTURE_3D);
return JNI_TRUE;
}
......@@ -629,10 +519,6 @@ OGLTR_DisableGlyphModeState()
j2d_glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
j2d_glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
j2d_glUseProgramObjectARB(0);
j2d_glActiveTextureARB(GL_TEXTURE3_ARB);
j2d_glDisable(GL_TEXTURE_3D);
j2d_glActiveTextureARB(GL_TEXTURE2_ARB);
j2d_glDisable(GL_TEXTURE_3D);
j2d_glActiveTextureARB(GL_TEXTURE1_ARB);
j2d_glDisable(GL_TEXTURE_2D);
j2d_glActiveTextureARB(GL_TEXTURE0_ARB);
......
......@@ -69,6 +69,15 @@ class PlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
return (T)flow;
}
protected void socketSetOption(int opt, Object val) throws SocketException {
try {
socketSetOption0(opt, val);
} catch (SocketException se) {
if (!connected)
throw se;
}
}
protected synchronized native void bind0(int lport, InetAddress laddr)
throws SocketException;
......@@ -101,7 +110,7 @@ class PlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl
protected native void datagramSocketClose();
protected native void socketSetOption(int opt, Object val)
protected native void socketSetOption0(int opt, Object val)
throws SocketException;
protected native Object socketGetOption(int opt) throws SocketException;
......
......@@ -83,6 +83,15 @@ class PlainSocketImpl extends AbstractPlainSocketImpl
return (T)flow;
}
protected void socketSetOption(int opt, boolean b, Object val) throws SocketException {
try {
socketSetOption0(opt, b, val);
} catch (SocketException se) {
if (socket == null || !socket.isConnected())
throw se;
}
}
native void socketCreate(boolean isServer) throws IOException;
native void socketConnect(InetAddress address, int port, int timeout)
......@@ -103,7 +112,7 @@ class PlainSocketImpl extends AbstractPlainSocketImpl
static native void initProto();
native void socketSetOption(int cmd, boolean on, Object value)
native void socketSetOption0(int cmd, boolean on, Object value)
throws SocketException;
native int socketGetOption(int opt, Object iaContainerObj) throws SocketException;
......
......@@ -156,19 +156,29 @@ public final class XClipboard extends SunClipboard implements OwnershipListener
isSelectionNotifyProcessed = true;
boolean mustSchedule = false;
synchronized (XClipboard.classLock) {
if (targetsAtom2Clipboard == null) {
targetsAtom2Clipboard = new HashMap<Long, XClipboard>(2);
XToolkit.awtLock();
try {
synchronized (XClipboard.classLock) {
try {
Thread.sleep(70);
} catch (InterruptedException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
if (targetsAtom2Clipboard == null) {
targetsAtom2Clipboard = new HashMap<Long, XClipboard>(2);
}
mustSchedule = targetsAtom2Clipboard.isEmpty();
targetsAtom2Clipboard.put(getTargetsPropertyAtom().getAtom(), this);
if (mustSchedule) {
XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(),
new SelectionNotifyHandler());
}
}
mustSchedule = targetsAtom2Clipboard.isEmpty();
targetsAtom2Clipboard.put(getTargetsPropertyAtom().getAtom(), this);
if (mustSchedule) {
XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(),
new SelectionNotifyHandler());
XToolkit.schedule(new CheckChangeTimerTask(), XClipboard.getPollInterval());
}
}
if (mustSchedule) {
XToolkit.schedule(new CheckChangeTimerTask(), XClipboard.getPollInterval());
} finally {
XToolkit.awtUnlock();
}
}
......
......@@ -31,18 +31,22 @@ package sun.awt.X11;
* common logical ancestor
*/
class XRootWindow extends XBaseWindow {
private static XRootWindow xawtRootWindow = null;
static XRootWindow getInstance() {
XToolkit.awtLock();
try {
if (xawtRootWindow == null) {
private static class LazyHolder {
private static final XRootWindow xawtRootWindow;
static {
XToolkit.awtLock();
try {
xawtRootWindow = new XRootWindow();
xawtRootWindow.init(xawtRootWindow.getDelayedParams().delete(DELAYED));
} finally {
XToolkit.awtUnlock();
}
return xawtRootWindow;
} finally {
XToolkit.awtUnlock();
}
}
static XRootWindow getInstance() {
return LazyHolder.xawtRootWindow;
}
private XRootWindow() {
......
......@@ -598,14 +598,19 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
}
}
}
if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("before XFilterEvent:"+ev);
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
ev.get_type() == XConstants.KeyPress
|| ev.get_type() == XConstants.KeyRelease)) {
keyEventLog.fine("before XFilterEvent:" + ev);
}
if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
continue;
}
if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
ev.get_type() == XConstants.KeyPress
|| ev.get_type() == XConstants.KeyRelease)) {
keyEventLog.fine(
"after XFilterEvent:" + ev); // IS THIS CORRECT?
}
dispatchEvent(ev);
......@@ -621,21 +626,28 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
}
}
/**
* Listener installed to detect display changes.
*/
private static final DisplayChangedListener displayChangedHandler =
new DisplayChangedListener() {
@Override
public void displayChanged() {
// 7045370: Reset the cached values
XToolkit.screenWidth = -1;
XToolkit.screenHeight = -1;
}
@Override
public void paletteChanged() {
}
};
static {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
if (ge instanceof SunGraphicsEnvironment) {
((SunGraphicsEnvironment)ge).addDisplayChangedListener(
new DisplayChangedListener() {
@Override
public void displayChanged() {
// 7045370: Reset the cached values
XToolkit.screenWidth = -1;
XToolkit.screenHeight = -1;
}
@Override
public void paletteChanged() {}
});
((SunGraphicsEnvironment) ge).addDisplayChangedListener(
displayChangedHandler);
}
}
......@@ -645,7 +657,9 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
try {
XWindowAttributes pattr = new XWindowAttributes();
try {
XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(), pattr.pData);
XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
XToolkit.getDefaultRootWindow(),
pattr.pData);
screenWidth = (int) pattr.get_width();
screenHeight = (int) pattr.get_height();
} finally {
......
......@@ -144,7 +144,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
jobjectArray ret = 0;
int retLen = 0;
int error=0;
int getaddrinfo_error=0;
struct addrinfo hints, *res, *resNew = NULL;
if (!initializeInetClasses(env))
......@@ -172,22 +172,23 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
return NULL;
}
getaddrinfo_error = getaddrinfo(hostname, NULL, &hints, &res);
#ifdef MACOSX
/* If we're looking up the local machine, bypass DNS lookups and get
* address from getifaddrs.
*/
ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
if (ret != NULL || (*env)->ExceptionCheck(env)) {
JNU_ReleaseStringPlatformChars(env, host, hostname);
return ret;
if (getaddrinfo_error) {
// If getaddrinfo fails try getifaddrs.
ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
if (ret != NULL || (*env)->ExceptionCheck(env)) {
JNU_ReleaseStringPlatformChars(env, host, hostname);
return ret;
}
}
#endif
error = getaddrinfo(hostname, NULL, &hints, &res);
if (error) {
if (getaddrinfo_error) {
/* report error */
ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
ThrowUnknownHostExceptionWithGaiError(
env, hostname, getaddrinfo_error);
JNU_ReleaseStringPlatformChars(env, host, hostname);
return NULL;
} else {
......
......@@ -296,7 +296,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
jobjectArray ret = 0;
int retLen = 0;
int error=0;
int getaddrinfo_error=0;
#ifdef AF_INET6
struct addrinfo hints, *res, *resNew = NULL;
#endif /* AF_INET6 */
......@@ -311,19 +311,6 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
CHECK_NULL_RETURN(hostname, NULL);
#ifdef MACOSX
/*
* If we're looking up the local machine, attempt to get the address
* from getifaddrs. This ensures we get an IPv6 address for the local
* machine.
*/
ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
if (ret != NULL || (*env)->ExceptionCheck(env)) {
JNU_ReleaseStringPlatformChars(env, host, hostname);
return ret;
}
#endif
#ifdef AF_INET6
/* Try once, with our static buffer. */
memset(&hints, 0, sizeof(hints));
......@@ -343,11 +330,27 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
}
#endif
error = getaddrinfo(hostname, NULL, &hints, &res);
getaddrinfo_error = getaddrinfo(hostname, NULL, &hints, &res);
#ifdef MACOSX
if (getaddrinfo_error) {
/*
* If getaddrinfo fails looking up the local machine, attempt to get the
* address from getifaddrs. This ensures we get an IPv6 address for the
* local machine.
*/
ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
if (ret != NULL || (*env)->ExceptionCheck(env)) {
JNU_ReleaseStringPlatformChars(env, host, hostname);
return ret;
}
}
#endif
if (error) {
if (getaddrinfo_error) {
/* report error */
ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
ThrowUnknownHostExceptionWithGaiError(
env, hostname, getaddrinfo_error);
JNU_ReleaseStringPlatformChars(env, host, hostname);
return NULL;
} else {
......
......@@ -1321,11 +1321,11 @@ static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd,
/*
* Class: java_net_PlainDatagramSocketImpl
* Method: socketSetOption
* Method: socketSetOption0
* Signature: (ILjava/lang/Object;)V
*/
JNIEXPORT void JNICALL
Java_java_net_PlainDatagramSocketImpl_socketSetOption(JNIEnv *env,
Java_java_net_PlainDatagramSocketImpl_socketSetOption0(JNIEnv *env,
jobject this,
jint opt,
jobject value) {
......
......@@ -885,11 +885,11 @@ Java_java_net_PlainSocketImpl_socketShutdown(JNIEnv *env, jobject this,
/*
* Class: java_net_PlainSocketImpl
* Method: socketSetOption
* Method: socketSetOption0
* Signature: (IZLjava/lang/Object;)V
*/
JNIEXPORT void JNICALL
Java_java_net_PlainSocketImpl_socketSetOption(JNIEnv *env, jobject this,
Java_java_net_PlainSocketImpl_socketSetOption0(JNIEnv *env, jobject this,
jint cmd, jboolean on,
jobject value) {
int fd;
......
......@@ -1012,12 +1012,10 @@ NET_MapSocketOption(jint cmd, int *level, int *optname) {
int i;
/*
* Different multicast options if IPv6 is enabled
*/
#ifdef AF_INET6
if (ipv6_available()) {
switch (cmd) {
// Different multicast options if IPv6 is enabled
case java_net_SocketOptions_IP_MULTICAST_IF:
case java_net_SocketOptions_IP_MULTICAST_IF2:
*level = IPPROTO_IPV6;
......@@ -1028,6 +1026,13 @@ NET_MapSocketOption(jint cmd, int *level, int *optname) {
*level = IPPROTO_IPV6;
*optname = IPV6_MULTICAST_LOOP;
return 0;
#if (defined(__solaris__) || defined(MACOSX))
// Map IP_TOS request to IPV6_TCLASS
case java_net_SocketOptions_IP_TOS:
*level = IPPROTO_IPV6;
*optname = IPV6_TCLASS;
return 0;
#endif
}
}
#endif
......@@ -1203,9 +1208,6 @@ int getDefaultIPv6Interface(struct in6_addr *target_addr) {
* Wrapper for getsockopt system routine - does any necessary
* pre/post processing to deal with OS specific oddities :-
*
* IP_TOS is a no-op with IPv6 sockets as it's setup when
* the connection is established.
*
* On Linux the SO_SNDBUF/SO_RCVBUF values must be post-processed
* to compensate for an incorrect value returned by the kernel.
*/
......@@ -1215,21 +1217,6 @@ NET_GetSockOpt(int fd, int level, int opt, void *result,
{
int rv;
#ifdef AF_INET6
if ((level == IPPROTO_IP) && (opt == IP_TOS)) {
if (ipv6_available()) {
/*
* For IPv6 socket option implemented at Java-level
* so return -1.
*/
int *tc = (int *)result;
*tc = -1;
return 0;
}
}
#endif
#ifdef __solaris__
rv = getsockopt(fd, level, opt, result, len);
#else
......@@ -1280,8 +1267,7 @@ NET_GetSockOpt(int fd, int level, int opt, void *result,
*
* For IP_TOS socket option need to mask off bits as this
* aren't automatically masked by the kernel and results in
* an error. In addition IP_TOS is a NOOP with IPv6 as it
* should be setup as connection time.
* an error.
*/
int
NET_SetSockOpt(int fd, int level, int opt, const void *arg,
......@@ -1312,9 +1298,9 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
/*
* IPPROTO/IP_TOS :-
* 1. IPv6 on Solaris/Mac OS: NOOP and will be set
* in flowinfo field when connecting TCP socket,
* or sending UDP packet.
* 1. IPv6 on Solaris/Mac OS:
* Set the TOS OR Traffic Class value to cater for
* IPv6 and IPv4 scenarios.
* 2. IPv6 on Linux: By default Linux ignores flowinfo
* field so enable IPV6_FLOWINFO_SEND so that flowinfo
* will be examined. We also set the IPv4 TOS option in this case.
......@@ -1324,12 +1310,6 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
if (level == IPPROTO_IP && opt == IP_TOS) {
int *iptos;
#if defined(AF_INET6) && (defined(__solaris__) || defined(MACOSX))
if (ipv6_available()) {
return 0;
}
#endif
#if defined(AF_INET6) && defined(__linux__)
if (ipv6_available()) {
int optval = 1;
......@@ -1337,6 +1317,16 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
(void *)&optval, sizeof(optval)) < 0) {
return -1;
}
/*
* Let's also set the IPV6_TCLASS flag.
* Linux appears to allow both IP_TOS and IPV6_TCLASS to be set
* This helps in mixed environments where IPv4 and IPv6 sockets
* are connecting.
*/
if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS,
arg, len) < 0) {
return -1;
}
}
#endif
......@@ -1429,7 +1419,7 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
* On Linux the receive buffer is used for both socket
* structures and the the packet payload. The implication
* is that if SO_RCVBUF is too small then small packets
* must be discard.
* must be discarded.
*/
#ifdef __linux__
if (level == SOL_SOCKET && opt == SO_RCVBUF) {
......@@ -1609,7 +1599,7 @@ NET_Bind(int fd, struct sockaddr *him, int len)
* NET_WAIT_READ, NET_WAIT_WRITE & NET_WAIT_CONNECT.
*
* The function will return when either the socket is ready for one
* of the specified operation or the timeout expired.
* of the specified operations or the timeout expired.
*
* It returns the time left from the timeout (possibly 0), or -1 if it expired.
*/
......
......@@ -1864,6 +1864,7 @@ Java_sun_awt_windows_WEmbeddedFrame_initIDs(JNIEnv *env, jclass cls)
AwtFrame::activateEmbeddingTopLevelMID = env->GetMethodID(cls, "activateEmbeddingTopLevel", "()V");
DASSERT(AwtFrame::activateEmbeddingTopLevelMID != NULL);
CHECK_NULL(AwtFrame::activateEmbeddingTopLevelMID);
AwtFrame::isEmbeddedInIEID = env->GetFieldID(cls, "isEmbeddedInIE", "Z");
DASSERT(AwtFrame::isEmbeddedInIEID != NULL);
......
......@@ -484,6 +484,10 @@ needs_compact3 = \
sun/security/jgss \
sun/security/krb5 \
java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java \
java/lang/invoke/lambda/LambdaStackTrace.java \
java/lang/invoke/LFCaching/LFGarbageCollectedTest.java \
java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java \
java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java \
java/lang/System/MacEncoding/TestFileEncoding.java \
java/nio/channels/AsynchronousSocketChannel/Leaky.java \
java/security/PermissionCollection/Concurrent.java \
......
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Robot;
import javax.swing.JButton;
import javax.swing.SwingUtilities;
/**
* @test
* @bug 8071306
* @author Sergey Bylokhov
*/
public final class SetEnabledPerformance {
private static Frame frame;
private static void createAndShowGUI() {
frame = new Frame();
frame.setLayout(new FlowLayout(FlowLayout.CENTER, 25, 0));
frame.setSize(600, 600);
frame.setLocationRelativeTo(null);
for (int i = 1; i < 10001; ++i) {
frame.add(new JButton("Button " + i));
}
frame.setVisible(true);
}
public static void main(final String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> createAndShowGUI());
final Robot robot = new Robot();
robot.waitForIdle();
robot.mouseMove(frame.getX() + 15, frame.getY() + 300);
robot.waitForIdle();
SwingUtilities.invokeAndWait(() -> {
long m = System.currentTimeMillis();
for (final Component comp : frame.getComponents()) {
comp.setEnabled(false);
}
m = System.currentTimeMillis() - m;
System.err.println("Disabled in " + m + " ms");
frame.dispose();
// we should be much faster, but leaves 1000 for the slow systems
if (m > 1000) {
throw new RuntimeException("Too slow");
}
});
}
}
\ No newline at end of file
/*
* Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 6255653
@summary REGRESSION: Override isLightweight() causes access violation in awt.dll
@author Andrei Dmitriev: area=awt-component
@run main StubPeerCrash
*/
/*
* The test may not crash for several times so iteratively continue up to some limit.
*/
import java.awt.*;
import java.awt.peer.*;
import java.awt.event.PaintEvent;
import java.awt.image.ImageProducer;
import java.awt.image.ImageObserver;
import java.awt.image.ColorModel;
import java.awt.image.VolatileImage;
import java.awt.GraphicsConfiguration;
import sun.awt.CausedFocusEvent;
import sun.java2d.pipe.Region;
public class StubPeerCrash {
public static int ITERATIONS = 20;
public static void main(String []s)
{
for (int i = 0; i < ITERATIONS; i++){
showFrame(i);
}
}
private static void showFrame(int i){
System.out.println("iteration = "+i);
Frame f = new Frame();
f.add(new AHeavyweightComponent());
f.setVisible(true);
f.setVisible(false);
}
}
class AHeavyweightComponent extends Component {
private ComponentPeer peer = new StubComponentPeer();
public AHeavyweightComponent(){
}
public boolean isLightweight() {
return false;
}
public ComponentPeer getPeer(){
return peer;
}
}
class StubComponentPeer implements ComponentPeer {
public boolean isObscured(){return true;};
public boolean canDetermineObscurity(){return true;};
public void setVisible(boolean b){};
public void setEnabled(boolean b){};
public void paint(Graphics g){};
public void repaint(long tm, int x, int y, int width, int height){};
public void print(Graphics g){};
public void setBounds(int x, int y, int width, int height, int op){};
public void handleEvent(AWTEvent e){};
public void coalescePaintEvent(PaintEvent e){};
public Point getLocationOnScreen(){return null;};
public Dimension getPreferredSize(){return null;};
public Dimension getMinimumSize(){return null;};
public ColorModel getColorModel(){return null;};
public Toolkit getToolkit(){return null;};
public Graphics getGraphics(){return null;};
public FontMetrics getFontMetrics(Font font){return null;};
public void dispose(){};
public void setForeground(Color c){};
public void setBackground(Color c){};
public void setFont(Font f){};
public void updateCursorImmediately(){};
public boolean requestFocus(Component lightweightChild,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time, CausedFocusEvent.Cause cause){
return true;
};
public boolean isFocusable(){return true;};
public Image createImage(ImageProducer producer){return null;};
public Image createImage(int width, int height){return null;};
public VolatileImage createVolatileImage(int width, int height){return null;};
public boolean prepareImage(Image img, int w, int h, ImageObserver o){return true;};
public int checkImage(Image img, int w, int h, ImageObserver o){return 0;};
public GraphicsConfiguration getGraphicsConfiguration(){return null;};
public boolean handlesWheelScrolling(){return true;};
public void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException{};
public Image getBackBuffer(){return null;};
public void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction){};
public void destroyBuffers(){};
/**
* Reparents this peer to the new parent referenced by <code>newContainer</code> peer
* Implementation depends on toolkit and container.
* @param newContainer peer of the new parent container
* @since 1.5
*/
public void reparent(ContainerPeer newContainer){};
/**
* Returns whether this peer supports reparenting to another parent withour destroying the peer
* @return true if appropriate reparent is supported, false otherwise
* @since 1.5
*/
public boolean isReparentSupported(){return true;};
/**
* Used by lightweight implementations to tell a ComponentPeer to layout
* its sub-elements. For instance, a lightweight Checkbox needs to layout
* the box, as well as the text label.
*/
public void layout(){};
public Rectangle getBounds(){return null;};
/**
* Applies the shape to the native component window.
* @since 1.7
*/
public void applyShape(Region shape){};
/**
* DEPRECATED: Replaced by getPreferredSize().
*/
public Dimension preferredSize(){return null;};
/**
* DEPRECATED: Replaced by getMinimumSize().
*/
public Dimension minimumSize(){return null;};
/**
* DEPRECATED: Replaced by setVisible(boolean).
*/
public void show(){};
/**
* DEPRECATED: Replaced by setVisible(boolean).
*/
public void hide(){};
/**
* DEPRECATED: Replaced by setEnabled(boolean).
*/
public void enable(){};
/**
* DEPRECATED: Replaced by setEnabled(boolean).
*/
public void disable(){};
/**
* DEPRECATED: Replaced by setBounds(int, int, int, int).
*/
public void reshape(int x, int y, int width, int height){};
}
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4956241 80769790
* @summary NPE debugging fonts
* @run main/othervm DebugFonts
*/
import java.awt.Font;
public class DebugFonts {
public static void main(String [] args) {
System.setProperty("sun.java2d.debugfonts", "true");
Font font = new Font("dialog", Font.PLAIN, 14);
System.out.println(font);
String s1 = font.getFamily();
String s2 = font.getFontName();
}
}
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8064833
* @summary Test correct font is obtained via family+style
* @run main HelvLtOblTest
*/
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.RenderingHints;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.image.BufferedImage;
public class HelvLtOblTest extends JComponent {
static Font helvFont = null;
static int[] codes = { 0x23, 0x4a, 0x48, 0x3, 0x4a, 0x55, 0x42, 0x4d,
0x4a, 0x44, 0x3,
0x53, 0x46, 0x45, 0x3, 0x55, 0x46, 0x59, 0x55, };
static String str = "Big italic red text";
public static void main(String[] args) throws Exception {
String os = System.getProperty("os.name");
if (!os.startsWith("Mac")) {
return;
}
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] fonts = ge.getAllFonts();
for (int i=0; i<fonts.length; i++) {
if (fonts[i].getPSName().equals("Helvetica-LightOblique")) {
helvFont = fonts[i];
break;
}
}
if (helvFont == null) {
return;
}
final HelvLtOblTest test = new HelvLtOblTest();
SwingUtilities.invokeLater(() -> {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add("Center", test);
f.pack();
f.setVisible(true);
});
test.compareImages();
}
public Dimension getPreferredSize() {
return new Dimension(400,400);
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
FontRenderContext frc = new FontRenderContext(null, true, true);
Font f = helvFont.deriveFont(Font.PLAIN, 40);
System.out.println("font = " +f.getFontName());
GlyphVector gv = f.createGlyphVector(frc, codes);
g.setFont(f);
g.setColor(Color.white);
g.fillRect(0,0,400,400);
g.setColor(Color.black);
g2.drawGlyphVector(gv, 5,200);
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g2.drawString(str, 5, 250);
}
void compareImages() {
BufferedImage bi0 = drawText(false);
BufferedImage bi1 = drawText(true);
compare(bi0, bi1);
}
BufferedImage drawText(boolean doGV) {
int w = 400;
int h = 50;
BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bi.createGraphics();
g.setColor(Color.white);
g.fillRect(0,0,w,h);
g.setColor(Color.black);
Font f = helvFont.deriveFont(Font.PLAIN, 40);
g.setFont(f);
int x = 5;
int y = h - 10;
if (doGV) {
FontRenderContext frc = new FontRenderContext(null, true, true);
GlyphVector gv = f.createGlyphVector(frc, codes);
g.drawGlyphVector(gv, 5, y);
} else {
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g.drawString(str, x, y);
}
return bi;
}
// Need to allow for minimal rounding error, so allow each component
// to differ by 1.
void compare(BufferedImage bi0, BufferedImage bi1) {
int wid = bi0.getWidth();
int hgt = bi0.getHeight();
for (int x=0; x<wid; x++) {
for (int y=0; y<hgt; y++) {
int rgb0 = bi0.getRGB(x, y);
int rgb1 = bi1.getRGB(x, y);
if (rgb0 == rgb1) continue;
int r0 = (rgb0 & 0xff0000) >> 16;
int r1 = (rgb1 & 0xff0000) >> 16;
int rdiff = r0-r1; if (rdiff<0) rdiff = -rdiff;
int g0 = (rgb0 & 0x00ff00) >> 8;
int g1 = (rgb1 & 0x00ff00) >> 8;
int gdiff = g0-g1; if (gdiff<0) gdiff = -gdiff;
int b0 = (rgb0 & 0x0000ff);
int b1 = (rgb1 & 0x0000ff);
int bdiff = b0-b1; if (bdiff<0) bdiff = -bdiff;
if (rdiff > 1 || gdiff > 1 || bdiff > 1) {
throw new RuntimeException(
"Images differ at x=" + x + " y="+ y + " " +
Integer.toHexString(rgb0) + " vs " +
Integer.toHexString(rgb1));
}
}
}
}
}
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/*
* @test
* @bug 8080137
* @summary Dragged events for extra mouse buttons (4,5,6) are not generated
* on JSplitPane
* @author alexandr.scherbatiy area=awt.event
* @run main MouseDraggedTest
*/
public class MouseDraggedTest {
private static JFrame frame;
private static Rectangle frameBounds;
private static volatile boolean mouseDragged;
public static void main(String[] args) throws Exception {
try {
Robot robot = new Robot();
robot.setAutoDelay(50);
SwingUtilities.invokeAndWait(MouseDraggedTest::createAndShowGUI);
robot.waitForIdle();
SwingUtilities.invokeAndWait(() -> frameBounds = frame.getBounds());
robot.waitForIdle();
for (int i = 1; i <= MouseInfo.getNumberOfButtons(); i++) {
testMouseDrag(i, robot);
}
} finally {
SwingUtilities.invokeLater(() -> {
if (frame != null) {
frame.dispose();
}
});
}
}
private static void testMouseDrag(int button, Robot robot) {
mouseDragged = false;
int x1 = frameBounds.x + frameBounds.width / 4;
int y1 = frameBounds.y + frameBounds.height / 4;
int x2 = frameBounds.x + frameBounds.width / 2;
int y2 = frameBounds.y + frameBounds.height / 2;
robot.mouseMove(x1, y1);
robot.waitForIdle();
int buttonMask = InputEvent.getMaskForButton(button);
robot.mousePress(buttonMask);
robot.mouseMove(x2, y2);
robot.mouseRelease(buttonMask);
robot.waitForIdle();
if (!mouseDragged) {
throw new RuntimeException("Mouse button " + button
+ " is not dragged");
}
}
static void createAndShowGUI() {
frame = new JFrame();
frame.setSize(400, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel(new BorderLayout());
panel.addMouseMotionListener(new MouseAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
mouseDragged = true;
}
});
frame.add(panel, BorderLayout.CENTER);
frame.setVisible(true);
}
}
\ No newline at end of file
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
@bug 8077409
@summary Drawing deviates when validate() is invoked on java.awt.ScrollPane
@author mikhail.cherkasov@oracle.com
@run main bug8077409Test
*/
import java.awt.*;
import java.awt.event.*;
public class bug8077409Test extends Frame {
ScrollPane pane;
MyCanvas myCanvas;
class MyCanvas extends Canvas {
public Dimension getPreferredSize() {
return new Dimension(400, 800);
}
public void paint(Graphics g) {
g.setColor(Color.BLACK);
g.drawLine(0, 0, 399, 0);
g.setColor(Color.RED);
g.drawLine(0, 1, 399, 1);
g.setColor(Color.BLUE);
g.drawLine(0, 2, 399, 2);
g.setColor(Color.GREEN);
g.drawLine(0, 3, 399, 3);
}
}
public bug8077409Test() {
super();
setLayout(new BorderLayout());
pane = new ScrollPane();
myCanvas = new MyCanvas();
pane.add(myCanvas);
add(pane, BorderLayout.CENTER);
setSize(320, 480);
}
@Override
protected void processKeyEvent(KeyEvent e) {
super.processKeyEvent(e);
}
public static void main(String[] args) throws AWTException, InterruptedException {
final bug8077409Test obj = new bug8077409Test();
obj.setVisible(true);
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
@Override
public void eventDispatched(AWTEvent e) {
KeyEvent keyEvent = (KeyEvent) e;
if(keyEvent.getID() == KeyEvent.KEY_RELEASED) {
if (keyEvent.getKeyCode() == KeyEvent.VK_1) {
System.out.println(obj.pane.toString());
System.out.println("obj.myCanvas.pos: " + obj.myCanvas.getBounds());
System.out.println(obj.myCanvas.toString());
} else if (keyEvent.getKeyCode() == KeyEvent.VK_2) {
obj.repaint();
} else if (keyEvent.getKeyCode() == KeyEvent.VK_DOWN) {
Point scrollPosition = obj.pane.getScrollPosition();
scrollPosition.translate(0, 1);
obj.pane.setScrollPosition(scrollPosition);
} else if (keyEvent.getKeyCode() == KeyEvent.VK_UP) {
Point scrollPosition = obj.pane.getScrollPosition();
scrollPosition.translate(0, -1);
obj.pane.setScrollPosition(scrollPosition);
} else if (keyEvent.getKeyCode() == KeyEvent.VK_SPACE) {
obj.pane.validate();
}
}
}
}, AWTEvent.KEY_EVENT_MASK);
Point scrollPosition = obj.pane.getScrollPosition();
scrollPosition.translate(0, 1);
obj.pane.setScrollPosition(scrollPosition);
int y = obj.pane.getComponent(0).getLocation().y;
obj.pane.validate();
if(y != obj.pane.getComponent(0).getLocation().y){
throw new RuntimeException("Wrong position of component in ScrollPane");
}
}
}
\ No newline at end of file
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.VolatileImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import static java.awt.geom.Rectangle2D.Double;
/**
* @test
* @bug 8061831
* @summary Tests drawing volatile image to volatile image using different
* clips + xor mode. Results of the blit compatibleImage to
* compatibleImage is used for comparison.
*/
public final class IncorrectClipXorModeSurface2Surface {
private static int[] SIZES = {2, 10, 100};
private static final Shape[] SHAPES = {
new Rectangle(0, 0, 0, 0),
new Rectangle(0, 0, 1, 1),
new Rectangle(0, 1, 1, 1),
new Rectangle(1, 0, 1, 1),
new Rectangle(1, 1, 1, 1),
new Double(0, 0, 0.5, 0.5),
new Double(0, 0.5, 0.5, 0.5),
new Double(0.5, 0, 0.5, 0.5),
new Double(0.5, 0.5, 0.5, 0.5),
new Double(0.25, 0.25, 0.5, 0.5),
new Double(0, 0.25, 1, 0.5),
new Double(0.25, 0, 0.5, 1),
new Double(.10, .10, .20, .20),
new Double(.75, .75, .20, .20),
new Double(.75, .10, .20, .20),
new Double(.10, .75, .20, .20),
};
public static void main(final String[] args) throws IOException {
GraphicsEnvironment ge = GraphicsEnvironment
.getLocalGraphicsEnvironment();
GraphicsConfiguration gc = ge.getDefaultScreenDevice()
.getDefaultConfiguration();
AffineTransform at;
for (int size : SIZES) {
at = AffineTransform.getScaleInstance(size, size);
for (Shape clip : SHAPES) {
clip = at.createTransformedShape(clip);
for (Shape to : SHAPES) {
to = at.createTransformedShape(to);
// Prepare test images
BufferedImage snapshot;
VolatileImage source = getVolatileImage(gc, size);
VolatileImage target = getVolatileImage(gc, size);
int attempt = 0;
while (true) {
if (++attempt > 10) {
throw new RuntimeException("Too many attempts: " + attempt);
}
// Prepare source images
source.validate(gc);
Graphics2D g2d = source.createGraphics();
g2d.setColor(Color.RED);
g2d.fillRect(0, 0, size, size);
g2d.dispose();
if (source.validate(gc) != VolatileImage.IMAGE_OK) {
continue;
}
// Prepare target images
target.validate(gc);
g2d = target.createGraphics();
g2d.setColor(Color.GREEN);
g2d.fillRect(0, 0, size, size);
g2d.dispose();
if (target.validate(gc) != VolatileImage.IMAGE_OK) {
continue;
}
draw(clip, to, source, target);
snapshot = target.getSnapshot();
if (source.contentsLost() || target.contentsLost()) {
continue;
}
break;
}
// Prepare gold images
BufferedImage goldS = getSourceGold(gc, size);
BufferedImage goldT = getTargetGold(gc, size);
draw(clip, to, goldS, goldT);
validate(snapshot, goldT);
source.flush();
target.flush();
}
}
}
}
private static void draw(Shape clip, Shape shape, Image from, Image to) {
Graphics2D g2d = (Graphics2D) to.getGraphics();
g2d.setXORMode(Color.BLACK);
g2d.setClip(clip);
Rectangle toBounds = shape.getBounds();
g2d.drawImage(from, toBounds.x, toBounds.y, toBounds.width,
toBounds.height, null);
g2d.dispose();
}
private static BufferedImage getSourceGold(GraphicsConfiguration gc,
int size) {
final BufferedImage bi = gc.createCompatibleImage(size, size);
Graphics2D g2d = bi.createGraphics();
g2d.setColor(Color.RED);
g2d.fillRect(0, 0, size, size);
g2d.dispose();
return bi;
}
private static BufferedImage getTargetGold(GraphicsConfiguration gc,
int size) {
BufferedImage image = gc.createCompatibleImage(size, size);
Graphics2D g2d = image.createGraphics();
g2d.setColor(Color.GREEN);
g2d.fillRect(0, 0, size, size);
g2d.dispose();
return image;
}
private static VolatileImage getVolatileImage(GraphicsConfiguration gc,
int size) {
return gc.createCompatibleVolatileImage(size, size);
}
private static void validate(BufferedImage bi, BufferedImage goldbi)
throws IOException {
for (int x = 0; x < bi.getWidth(); ++x) {
for (int y = 0; y < bi.getHeight(); ++y) {
if (goldbi.getRGB(x, y) != bi.getRGB(x, y)) {
ImageIO.write(bi, "png", new File("actual.png"));
ImageIO.write(goldbi, "png", new File("expected.png"));
throw new RuntimeException("Test failed.");
}
}
}
}
}
......@@ -38,12 +38,19 @@ public class InvokeSeveralWays {
failures++;
} catch (InvocationTargetException e) {
Throwable c = e.getCause();
if (expected.isInstance(c))
System.out.println("EXPECTED: " + expected.getName() + ", "+ c);
else {
failures++;
System.out.println("FAIL: Unexpected wrapped exception " + c);
e.printStackTrace(System.out);
if (BootstrapMethodError.class.isInstance(c)) {
c = c.getCause();
if (expected.isInstance(c))
System.out.println("EXPECTED: " + expected.getName() + ", "+ c);
else {
failures++;
System.out.println("FAIL: Unexpected wrapped exception " + c);
e.printStackTrace(System.out);
}
} else {
failures++;
System.out.println("FAIL: Exception from MethodHandle invocation not wrapped in BootstrapMethodError " + c);
e.printStackTrace(System.out);
}
} catch (Throwable e) {
failures++;
......@@ -74,14 +81,19 @@ public class InvokeSeveralWays {
Invoker.invoke();
System.out.println("FAIL: No exception throw, probably failed to load modified bytecodes for MethodSupplier");
failures++;
} catch (Throwable e) {
if (expected.isInstance(e))
System.out.println("EXPECTED: " + expected.getName() + ", "+ e);
} catch (BootstrapMethodError e) {
Throwable c = e.getCause();
if (expected.isInstance(c))
System.out.println("EXPECTED: " + expected.getName() + ", "+ c);
else {
failures++;
System.out.println("FAIL: Unexpected exception has been caught " + c);
e.printStackTrace(System.out);
}
} catch (Throwable e) {
failures++;
System.out.println("FAIL: Unexpected exception has been caught " + e);
System.out.println("FAIL: Exception from MethodHandle invocation not wrapped in BootstrapMethodError " + e);
e.printStackTrace(System.out);
}
}
System.out.println();
try {
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -24,6 +24,7 @@
/*
* @test LFGarbageCollectedTest
* @bug 8046703
* @ignore 8078602
* @summary Test verifies that lambda forms are garbage collected
* @author kshefov
* @library /lib/testlibrary/jsr292 /lib/testlibrary
......
# JDBC unit tests uses TestNG
TestNG.dirs = .
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package test.sql;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.ObjectInputStream;
import java.sql.BatchUpdateException;
import java.sql.SQLException;
import java.util.Arrays;
import static org.testng.Assert.*;
import org.testng.annotations.Test;
import util.SerializedBatchUpdateException;
import util.BaseTest;
public class BatchUpdateExceptionTests extends BaseTest {
private final int[] uc = {1, 2, 3};
private final long[] luc = {1, 2, 3};
private final String testSrcDir = System.getProperty("test.src", ".")
+ File.separatorChar;
/**
* Create BatchUpdateException and setting all objects to null
*/
@Test
public void test() {
BatchUpdateException be = new BatchUpdateException(null,
null, errorCode, (int[]) null, null);
assertTrue(be.getMessage() == null && be.getSQLState() == null
&& be.getUpdateCounts() == null && be.getCause() == null
&& be.getLargeUpdateCounts() == null
&& be.getErrorCode() == errorCode);
}
/**
* Create BatchUpdateException with no-arg constructor
*/
@Test
public void test1() {
BatchUpdateException ex = new BatchUpdateException();
assertTrue(ex.getMessage() == null
&& ex.getSQLState() == null
&& ex.getCause() == null
&& ex.getErrorCode() == 0
&& ex.getUpdateCounts() == null
&& ex.getLargeUpdateCounts() == null);
}
/**
* Create BatchUpdateException with null Throwable
*/
@Test
public void test2() {
BatchUpdateException ex = new BatchUpdateException((Throwable) null);
assertTrue(ex.getMessage() == null
&& ex.getSQLState() == null
&& ex.getCause() == null
&& ex.getErrorCode() == 0
&& ex.getUpdateCounts() == null
&& ex.getLargeUpdateCounts() == null);
}
/**
* Create BatchUpdateException with message and update counts
*/
@Test
public void test3() {
BatchUpdateException ex = new BatchUpdateException(reason, uc);
assertTrue(ex.getMessage().equals(reason)
&& ex.getSQLState() == null
&& ex.getCause() == null
&& ex.getErrorCode() == 0
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with update counts
*/
@Test
public void test4() {
BatchUpdateException ex = new BatchUpdateException(uc);
assertTrue(ex.getMessage() == null
&& ex.getSQLState() == null
&& ex.getCause() == null
&& ex.getErrorCode() == 0
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with Throwable and update counts
*/
@Test
public void test5() {
BatchUpdateException ex = new BatchUpdateException(uc, t);
assertTrue(ex.getMessage().equals(cause)
&& ex.getSQLState() == null
&& cause.equals(ex.getCause().toString())
&& ex.getErrorCode() == 0
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with message, Throwable, and update counts
*/
@Test
public void test6() {
BatchUpdateException ex = new BatchUpdateException(reason, uc, t);
assertTrue(ex.getMessage().equals(reason)
&& ex.getSQLState() == null
&& cause.equals(ex.getCause().toString())
&& ex.getErrorCode() == 0
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with message, SQLState, Throwable, and update
* counts
*/
@Test
public void test7() {
BatchUpdateException ex = new BatchUpdateException(reason, state, uc, t);
assertTrue(ex.getMessage().equals(reason)
&& ex.getSQLState().equals(state)
&& cause.equals(ex.getCause().toString())
&& ex.getErrorCode() == 0
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with message, SQLState, errorCode code
* Throwable, and update counts
*/
@Test
public void test8() {
BatchUpdateException ex = new BatchUpdateException(reason, state, errorCode,
uc, t);
assertTrue(ex.getMessage().equals(reason)
&& ex.getSQLState().equals(state)
&& cause.equals(ex.getCause().toString())
&& ex.getErrorCode() == errorCode
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Create BatchUpdateException with message, SQLState, errorCode code
* Throwable, and long [] update counts
*/
@Test
public void test9() {
BatchUpdateException ex = new BatchUpdateException(reason, state, errorCode,
luc, t);
assertTrue(ex.getMessage().equals(reason)
&& ex.getSQLState().equals(state)
&& cause.equals(ex.getCause().toString())
&& ex.getErrorCode() == errorCode
&& Arrays.equals(ex.getUpdateCounts(), uc)
&& Arrays.equals(ex.getLargeUpdateCounts(), luc)
);
}
/**
* Validate that a copy of the update counts array is made
*/
@Test
public void test10() {
int[] uc1 = {1, 2};
BatchUpdateException ex = new BatchUpdateException(uc1);
assertTrue(Arrays.equals(ex.getUpdateCounts(), uc1));
uc1[0] = 6689;
assertFalse(Arrays.equals(ex.getUpdateCounts(), uc1));
}
/**
* Validate that if null is specified for the update count, it is returned
* as null
*/
@Test
public void test11() {
BatchUpdateException ex = new BatchUpdateException((int[]) null);
assertTrue(ex.getMessage() == null && ex.getSQLState() == null
&& ex.getErrorCode() == 0 && ex.getUpdateCounts() == null
&& ex.getLargeUpdateCounts() == null);
}
/**
* Serialize a BatchUpdateException and make sure you can read it back
* properly
*/
@Test
public void test12() throws Exception {
BatchUpdateException be = new BatchUpdateException(reason, state, errorCode,
uc, t);
BatchUpdateException bue
= createSerializedException(be);
assertTrue(reason.equals(bue.getMessage())
&& bue.getSQLState().equals(state)
&& cause.equals(bue.getCause().toString())
&& bue.getErrorCode() == errorCode
&& Arrays.equals(bue.getLargeUpdateCounts(), luc)
&& Arrays.equals(bue.getUpdateCounts(), uc));
}
/**
* De-Serialize a BatchUpdateException from JDBC 4.0 and make sure you can
* read it back properly
*/
@Test
public void test13() throws Exception {
String reason1 = "This was the error msg";
String state1 = "user defined sqlState";
String cause1 = "java.lang.Throwable: throw 1";
int errorCode1 = 99999;
Throwable t = new Throwable("throw 1");
int[] uc1 = {1, 2, 21};
long[] luc1 = {1, 2, 21};
ObjectInputStream ois = new ObjectInputStream(
new ByteArrayInputStream(SerializedBatchUpdateException.DATA));
BatchUpdateException bue = (BatchUpdateException) ois.readObject();
assertTrue(reason1.equals(bue.getMessage())
&& bue.getSQLState().equals(state1)
&& bue.getErrorCode() == errorCode1
&& cause1.equals(bue.getCause().toString())
&& Arrays.equals(bue.getLargeUpdateCounts(), luc1)
&& Arrays.equals(bue.getUpdateCounts(), uc1));
}
/**
* Serialize a BatchUpdateException with an Integer.MAX_VALUE + 1 and
* validate you can read it back properly
*/
@Test
public void test14() throws Exception {
int[] uc1 = {Integer.MAX_VALUE, Integer.MAX_VALUE + 1};
long[] luc1 = {Integer.MAX_VALUE, Integer.MAX_VALUE + 1};
BatchUpdateException be = new BatchUpdateException(reason, state, errorCode,
luc1, t);
BatchUpdateException bue
= createSerializedException(be);
assertTrue(reason.equals(bue.getMessage())
&& bue.getSQLState().equals(state)
&& cause.equals(bue.getCause().toString())
&& bue.getErrorCode() == errorCode
&& Arrays.equals(bue.getLargeUpdateCounts(), luc1)
&& Arrays.equals(bue.getUpdateCounts(), uc1));
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using for-each loop
*/
@Test
public void test15() {
BatchUpdateException ex = new BatchUpdateException("Exception 1", uc, t1);
BatchUpdateException ex1 = new BatchUpdateException("Exception 2", uc);
BatchUpdateException ex2 = new BatchUpdateException("Exception 3", uc, t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(msgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct
* using traditional while loop
*/
@Test
public void test16() {
BatchUpdateException ex = new BatchUpdateException("Exception 1", uc, t1);
BatchUpdateException ex1 = new BatchUpdateException("Exception 2", uc);
BatchUpdateException ex2 = new BatchUpdateException("Exception 3", uc, t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
SQLException sqe = ex;
int num = 0;
while (sqe != null) {
assertTrue(msgs[num++].equals(sqe.getMessage()));
Throwable c = sqe.getCause();
while (c != null) {
assertTrue(msgs[num++].equals(c.getMessage()));
c = c.getCause();
}
sqe = sqe.getNextException();
}
}
}
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package test.sql;
import java.sql.DataTruncation;
import java.sql.SQLException;
import static org.testng.Assert.*;
import org.testng.annotations.Test;
import util.BaseTest;
public class DataTruncationTests extends BaseTest {
private final String READ_TRUNCATION = "01004";
private final String WRITE_TRUNCATION = "22001";
private final String dtReason = "Data truncation";
private final int dterrorCode = 0;
private final String[] dtmsgs = {dtReason, "cause 1", dtReason,
dtReason, "cause 2"};
private boolean onRead = false;
private final boolean parameter = false;
private final int index = 21;
private final int dataSize = 25;
private final int transferSize = 10;
/**
* Create DataTruncation object indicating a truncation on read
*/
@Test
public void test() {
onRead = true;
DataTruncation e = new DataTruncation(index, parameter, onRead,
dataSize, transferSize);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(READ_TRUNCATION)
&& e.getCause() == null
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == index);
}
/**
* Create DataTruncation object indicating a truncation on write
*/
@Test
public void test1() {
onRead = false;
DataTruncation e = new DataTruncation(index, parameter, onRead,
dataSize, transferSize);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(WRITE_TRUNCATION)
&& e.getCause() == null
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == index);
}
/**
* Create DataTruncation object indicating a truncation on read with a
* Throwable
*/
@Test
public void test2() {
onRead = true;
DataTruncation e = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, t);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(READ_TRUNCATION)
&& cause.equals(e.getCause().toString())
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == index);
}
/**
* Create DataTruncation object indicating a truncation on read with null
* specified for the Throwable
*/
@Test
public void test3() {
onRead = true;;
DataTruncation e = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, null);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(READ_TRUNCATION)
&& e.getCause() == null
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == index);
}
/**
* Create DataTruncation object indicating a truncation on read and you can
* pass a -1 for the index
*/
@Test
public void test4() {
onRead = true;
int negIndex = -1;
DataTruncation e = new DataTruncation(negIndex, parameter, onRead,
dataSize, transferSize);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(READ_TRUNCATION)
&& e.getCause() == null
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == negIndex);
}
/**
* Serialize a DataTruncation and make sure you can read it back properly
*/
@Test
public void test5() throws Exception {
DataTruncation e = new DataTruncation(index, parameter, onRead,
dataSize, transferSize);
DataTruncation ex1 = createSerializedException(e);
assertTrue(e.getMessage().equals(dtReason)
&& e.getSQLState().equals(READ_TRUNCATION)
&& e.getCause() == null
&& e.getErrorCode() == dterrorCode
&& e.getParameter() == parameter
&& e.getRead() == onRead
&& e.getDataSize() == dataSize
&& e.getTransferSize() == transferSize
&& e.getIndex() == index);
}
/**
* Validate that the ordering of the returned Exceptions is correct using
* for-each loop
*/
@Test
public void test11() {
DataTruncation ex = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, t1);
DataTruncation ex1 = new DataTruncation(index, parameter, onRead,
dataSize, transferSize);
DataTruncation ex2 = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
for (Throwable e : ex) {
assertTrue(dtmsgs[num++].equals(e.getMessage()));
}
}
/**
* Validate that the ordering of the returned Exceptions is correct using
* traditional while loop
*/
@Test
public void test12() {
DataTruncation ex = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, t1);
DataTruncation ex1 = new DataTruncation(index, parameter, onRead,
dataSize, transferSize);
DataTruncation ex2 = new DataTruncation(index, parameter, onRead,
dataSize, transferSize, t2);
ex.setNextException(ex1);
ex.setNextException(ex2);
int num = 0;
SQLException sqe = ex;
while (sqe != null) {
assertTrue(dtmsgs[num++].equals(sqe.getMessage()));
Throwable c = sqe.getCause();
while (c != null) {
assertTrue(dtmsgs[num++].equals(c.getMessage()));
c = c.getCause();
}
sqe = sqe.getNextException();
}
}
}
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package test.sql;
import java.sql.Date;
import java.time.Instant;
import java.time.LocalDate;
import static org.testng.Assert.*;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import util.BaseTest;
public class DateTests extends BaseTest {
/*
* Validate an IllegalArgumentException is thrown for an invalid Date string
*/
@Test(dataProvider = "invalidDateValues",
expectedExceptions = IllegalArgumentException.class)
public void test(String d) throws Exception {
Date.valueOf(d);
}
/*
* Test that a date created from a date string is equal to the value
* returned from toString()
*/
@Test(dataProvider = "validDateValues")
public void test00(String d, String expectedD) {
Date d1 = Date.valueOf(d);
Date d2 = Date.valueOf(expectedD);
assertTrue(d1.equals(d2) && d2.equals(d1)
&& d1.toString().equals(expectedD), "Error d1 != d2");
}
/*
* Validate that a Date.after() returns false when same date is compared
*/
@Test
public void test01() {
Date d = Date.valueOf("1961-08-30");
assertFalse(d.after(d), "Error d.after(d) = true");
}
/*
* Validate that a Date.after() returns true when later date is compared to
* earlier date
*/
@Test
public void test2() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(System.currentTimeMillis());
assertTrue(d2.after(d), "Error d2.after(d) = false");
}
/*
* Validate that a Date.after() returns false when earlier date is compared
* to later date
*/
@Test
public void test3() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertFalse(d.after(d2), "Error d.after(d2) = true");
}
/*
* Validate that a Date.after() returns false when date compared to another
* date created from the original date
*/
@Test
public void test4() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertFalse(d.after(d2), "Error d.after(d2) = true");
assertFalse(d2.after(d), "Error d2.after(d) = true");
}
/*
* Validate that a Date.before() returns false when same date is compared
*/
@Test
public void test5() {
Date d = Date.valueOf("1961-08-30");
assertFalse(d.before(d), "Error d.before(d) = true");
}
/*
* Validate that a Date.before() returns true when earlier date is compared
* to later date
*/
@Test
public void test6() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(System.currentTimeMillis());
assertTrue(d.before(d2), "Error d.before(d2) = false");
}
/*
* Validate that a Date.before() returns false when later date is compared
* to earlier date
*/
@Test
public void test7() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertFalse(d2.before(d), "Error d2.before(d) = true");
}
/*
* Validate that a Date.before() returns false when date compared to another
* date created from the original date
*/
@Test
public void test8() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertFalse(d.before(d2), "Error d.before(d2) = true");
assertFalse(d2.before(d), "Error d2.before(d) = true");
}
/*
* Validate that a Date.compareTo returns 0 when both Date objects are the
* same
*/
@Test
public void test9() {
Date d = Date.valueOf("1961-08-30");
assertTrue(d.compareTo(d) == 0, "Error d.compareTo(d) !=0");
}
/*
* Validate that a Date.compareTo returns 0 when both Date objects represent
* the same date
*/
@Test
public void test10() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertTrue(d.compareTo(d2) == 0, "Error d.compareTo(d2) !=0");
}
/*
* Validate that a Date.compareTo returns -1 when comparing a date to a
* later date
*/
@Test
public void test11() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(System.currentTimeMillis());
assertTrue(d.compareTo(d2) == -1, "Error d.compareTo(d2) != -1");
}
/*
* Validate that a Date.compareTo returns 1 when comparing a date to an
* earlier date
*/
@Test
public void test12() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(System.currentTimeMillis());
assertTrue(d2.compareTo(d) == 1, "Error d.compareTo(d2) != 1");
}
/*
* Validate that a Date made from a LocalDate are equal
*/
@Test
public void test13() {
Date d = Date.valueOf("1961-08-30");
LocalDate ldt = d.toLocalDate();
Date d2 = Date.valueOf(ldt);
assertTrue(d.equals(d2), "Error d != d2");
}
/*
* Validate that a Date LocalDate value, made from a LocalDate are equal
*/
@Test
public void test14() {
LocalDate ldt = LocalDate.now();
Date d = Date.valueOf(ldt);
assertTrue(ldt.equals(d.toLocalDate()),
"Error LocalDate values are not equal");
}
/*
* Validate an NPE occurs when a null LocalDate is passed to valueOf
*/
@Test(expectedExceptions = NullPointerException.class)
public void test15() throws Exception {
LocalDate ld = null;
Date.valueOf(ld);
}
/*
* Validate an UnsupportedOperationException occurs when toInstant() is
* called
*/
@Test(expectedExceptions = UnsupportedOperationException.class)
public void test16() throws Exception {
Date d = Date.valueOf("1961-08-30");
Instant instant = d.toInstant();
}
/*
* Validate that two Date objects are equal when one is created from the
* toString() of the other
*/
@Test
public void test17() {
Date d = Date.valueOf("1961-08-30");
Date d2 = Date.valueOf(d.toString());
assertTrue(d.equals(d2) && d2.equals(d), "Error d != d2");
}
/*
* Validate that two Date values one created using valueOf and another via a
* constructor are equal
*/
@Test
public void test18() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(61, 7, 30);
assertTrue(d.equals(d2), "Error d != d2");
}
/*
* Validate that two Date values one created using getTime() of the other
* are equal
*/
@Test
public void test19() {
Date d = Date.valueOf("1961-08-30");
Date d2 = new Date(d.getTime());
assertTrue(d.equals(d2), "Error d != d2");
}
/*
* Validate that a Date value is equal to itself
*/
@Test
public void test20() {
Date d = Date.valueOf("1961-08-30");
assertTrue(d.equals(d), "Error d != d");
}
/*
* Validate an IllegalArgumentException is thrown for calling getHours
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test21() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.getHours();
}
/*
* Validate an IllegalArgumentException is thrown for calling getMinutes
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test22() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.getMinutes();
}
/*
* Validate an IllegalArgumentException is thrown for calling getSeconds
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test23() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.getSeconds();
}
/*
* Validate an IllegalArgumentException is thrown for calling setHours
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test24() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.setHours(8);
}
/*
* Validate an IllegalArgumentException is thrown for calling setMinutes
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test25() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.setMinutes(0);
}
/*
* Validate an IllegalArgumentException is thrown for calling setSeconds
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void test26() throws Exception {
Date d = Date.valueOf("1961-08-30");
d.setSeconds(0);
}
/*
* DataProvider used to provide Date which are not valid and are used
* to validate that an IllegalArgumentException will be thrown from the
* valueOf method
*/
@DataProvider(name = "invalidDateValues")
private Object[][] invalidDateValues() {
return new Object[][]{
{"20009-11-01"},
{"09-11-01"},
{"-11-01"},
{"2009-111-01"},
{"2009--01"},
{"2009-13-01"},
{"2009-11-011"},
{"2009-11-"},
{"2009-11-00"},
{"2009-11-33"},
{"--"},
{""},
{null},
{"-"},
{"2009"},
{"2009-01"},
{"---"},
{"2009-13--1"},
{"1900-1-0"},
{"2009-01-01 10:50:01"},
{"1996-12-10 12:26:19.1"},
{"10:50:01"}
};
}
/*
* DataProvider used to provide Dates which are valid and are used
* to validate that an IllegalArgumentException will not be thrown from the
* valueOf method and the corect value from toString() is returned
*/
@DataProvider(name = "validDateValues")
private Object[][] validDateValues() {
return new Object[][]{
{"2009-08-30", "2009-08-30"},
{"2009-01-8", "2009-01-08"},
{"2009-1-01", "2009-01-01"},
{"2009-1-1", "2009-01-01"}
};
}
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册